Skip to content

Commit

Permalink
fix getAuthCredentials params
Browse files Browse the repository at this point in the history
  • Loading branch information
yutomoriyasu committed Feb 6, 2023
1 parent 7177ce7 commit 67763c6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ composer require saasus-platform/saasus-sdk-php
SAASUS_SAAS_ID="(画面のSaaS ID)"
SAASUS_API_KEY="(画面のAPI KEY)"
SAASUS_SECRET_KEY="(画面のクライアントシークレット)"
SAASUS_LOGIN_URL="https://auth.sample.saasus.jp/ (ログイン画面のURL)"
SAASUS_LOGIN_URL="https://auth.sample.saasus.jp/(ログイン画面のURL)"
```

SAASUS_SAAS_ID, SAASUS_API_KEY, SAASUS_SECRET_KEY は SaaS 開発コンソール画面に表示されている SaaS ID、 API キー  と クライアントシークレットを、
Expand Down
2 changes: 1 addition & 1 deletion src/Laravel/Controllers/CallbackApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function index(Request $request)
$client = new ApiClient();
$authApi = $client->getAuthClient();
try {
$res = $authApi->getAuthCredentials(['code' => $request->code], $authApi::FETCH_RESPONSE);
$res = $authApi->getAuthCredentials(['auth-flow' => 'tempCodeAuth', 'code' => $request->code], $authApi::FETCH_RESPONSE);
return json_decode($res->getBody(), true);
} catch (GetAuthCredentialsNotFoundException | GetAuthCredentialsInternalServerErrorException $e) {
if (get_class($e) == 'GetAuthCredentialsNotFoundException') {
Expand Down
2 changes: 1 addition & 1 deletion src/Laravel/Controllers/CallbackController.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function index(Request $request)
$client = new ApiClient;
$authApiClient = $client->getAuthClient();
try {
$res = $authApiClient->getAuthCredentials(['code' => $request->code]);
$res = $authApiClient->getAuthCredentials(['auth-flow' => 'tempCodeAuth', 'code' => $request->code]);
$idToken = $res->getIdToken();
} catch (GetAuthCredentialsNotFoundException | GetAuthCredentialsInternalServerErrorException $e) {
if (get_class($e) == 'GetAuthCredentialsNotFoundException') {
Expand Down

0 comments on commit 67763c6

Please sign in to comment.