Skip to content

Commit

Permalink
Update AuthClient.php
Browse files Browse the repository at this point in the history
  • Loading branch information
xxutianyi committed Dec 22, 2023
1 parent 576016f commit 9ddad5e
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/Auth/AuthClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,18 @@ public function getAccessTokenByCode(string $code)
return SimpleRequest::post($url, [], $body, [], false);
}

public function introspectToken(string $token)
{
$url = $this->options->appHost . "/oidc/token/introspection";
$body = [
'client_id' => $this->options->appId,
'client_secret' => $this->options->appSecret,
'token' => $token
];

return SimpleRequest::post($url, [], $body, [], false);
}

public function revokeToken(string $token)
{
$url = $this->options->appHost . "/oidc/token/revocation";
Expand Down Expand Up @@ -81,6 +93,6 @@ public function getUserInfoByAccessToken(string $accessToken, bool $withCustomDa
'Authorization' => "Bearer $accessToken"
];

return SimpleRequest::post($url, [], $body, $headers,false);
return SimpleRequest::post($url, [], $body, $headers, false);
}
}

0 comments on commit 9ddad5e

Please sign in to comment.