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