introspectClientCredentialsAccessToken method

Future<ClientResponse<Map<String, dynamic>, OAuthError>> introspectClientCredentialsAccessToken(
  1. String token
)

Inspect an access token issued as the result of the Client Credentials Grant.

@param {String} token The access token returned by this OAuth provider as the result of a successful client credentials grant. @returns {Promise<ClientResponse<Map<String, dynamic>>>}

Implementation

Future<ClientResponse<Map<String, dynamic>, OAuthError>>
    introspectClientCredentialsAccessToken(String token) {
  var body = <String, dynamic>{};
  body['token'] = token;
  return _startAnonymous<Map<String, dynamic>, OAuthError>()
      .withUri('/oauth2/introspect')
      .withFormData(body)
      .withMethod('POST')
      .withResponseHandler(defaultResponseHandlerBuilder(
          (d) => Map<String, dynamic>.fromJson(d)))
      .go();
}