revokeToken method
Future<OAuth2Response>
revokeToken(
- AccessTokenResponse tknResp, {
- String? clientId,
- String? clientSecret,
- dynamic httpClient,
Revokes both the Access and the Refresh tokens in the provided tknResp
Implementation
Future<OAuth2Response> revokeToken(AccessTokenResponse tknResp,
{String? clientId, String? clientSecret, httpClient}) async {
var tokenRevocationResp = await revokeAccessToken(tknResp,
clientId: clientId, clientSecret: clientSecret, httpClient: httpClient);
if (tokenRevocationResp.isValid()) {
tokenRevocationResp = await revokeRefreshToken(tknResp,
clientId: clientId,
clientSecret: clientSecret,
httpClient: httpClient);
}
return tokenRevocationResp;
}