A Laravel package for seamless integration with the SIASN REST API. This library is the abstraction of SIASN API for access from applications written with Laravel PHP Framework.
Want to provide tangible support? Use the following platforms to contribute to open-source software development:
Your support is greatly appreciated!
Install the package via Composer:
composer require kanekescom/laravel-siasn-apiPublish the config file:
php artisan vendor:publish --tag="siasn-api-config"Or complete all installations with:
php artisan siasn-api:installGenerate APIM Token:
php artisan siasn:apim-tokenGenerate SSO Token:
php artisan siasn:sso-tokenGenerate both APIM and SSO Tokens:
php artisan siasn:tokenUse --fresh to always request a new token.
php artisan siasn:forget-tokenuse Kanekes\Siasn\Api\Credentials\Token;
Token::getNewApimToken(); // Always request a new APIM token
Token::getApimToken(); // Request APIM token
Token::getNewSsoToken(); // Always request a new SSO token
Token::getSsoToken(); // Request SSO token
Token::forget(); // Remove APIM and SSO tokensphp artisan siasn:get {endpoint}Example:
php artisan siasn:get https://apimws.bkn.go.id:8243/apisiasn/1.0/referensi/ref-unorphp artisan siasn:post {endpoint}The Siasn class uses Laravel's Http class (Illuminate\Support\Facades\Http):
use Kanekes\Siasn\Api\Facades\Siasn;
Siasn::get($endpoint, $params);For dual authentication (SSO), use:
use Kanekes\Siasn\Api\Facades\Siasn;
Siasn::withSso()->get($endpoint, $params);composer testSee CHANGELOG for recent updates.
See CONTRIBUTING for contribution guidelines.
See our security policy on how to report security vulnerabilities.
The MIT License (MIT). See License File for details.