oauthIntrospectWithHttpInfo method

Future<Response> oauthIntrospectWithHttpInfo(
  1. String token
)

RFC 7662 token introspection. Accepts both OAuth access tokens and PATs.

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> oauthIntrospectWithHttpInfo(String token,) async {
  // ignore: prefer_const_declarations
  final path = r'/oauth2/introspect';

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  const contentTypes = <String>['application/x-www-form-urlencoded'];

  if (token != null) {
    formParams[r'token'] = parameterToString(token);
  }

  return apiClient.invokeAPI(
    path,
    'POST',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}