Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update readme #63

Merged
merged 2 commits into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 21 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,23 +130,38 @@ Generate an SSO Token
php artisan siasn:sso-token
```

Generate an APIM and SSO Token
Generate an APIM and SSO Tokens

```bash
php artisan siasn:token
```

You can add the `--fresh` option to always request a new token

### Remove Token
### Remove Tokens

Remove an APIM and SSO Token
Remove an APIM and SSO Tokens

```bash
php artisan siasn:forget-token
```

### Send Request
### Available Token Methods

Generate an APIM Token

```php
Token::getNewApimToken(); // Always request a new APIM token
Token::getApimToken(); // Request a new APIM token

Token::getNewSsoToken(); // Always request a new SSO token
Token::getSsoToken(); // Request a new SSO token

Token::forget(); // Remove APIM and SSO Tokens
```

### Send a Request
Using Command

Send a GET request to endpoint of SIASN API

Expand All @@ -166,9 +181,9 @@ Send a POST request to endpoint of SIASN API
php artisan siasn:post {endpoint}
```

### Using Class
### Send a Request Using Class

The Siasn class uses the Http class (Illuminate\Support\Facades\Http) from Laravel. So you can use it just like you would use that class.
The Siasn class uses the `Http` class (`Illuminate\Support\Facades\Http`) from Laravel. So you can use it just like you would use that class.

```php
Siasn::get($endpoint, $params)
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/GenerateTokenCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class GenerateTokenCommand extends Command
protected $signature = 'siasn:token
{--fresh : Always request a new token}';

protected $description = 'Generate an APIM and SSO Token';
protected $description = 'Generate an APIM and SSO Tokens';

public function handle(): int
{
Expand Down