Functions - oauth2

validateOAuth2Token

Validates the given OAuth2 token by calling the OAuth2 introspection endpoint.

validateOAuth2Token

(string token, IntrospectionServerConfig config)

returns IntrospectionResponse | Error

Validates the given OAuth2 token by calling the OAuth2 introspection endpoint.

 oauth2:IntrospectionResponse|oauth2:Error result = oauth2:validateOAuth2Token(token, introspectionServerConfig);

Parameters

  • token string
  • OAuth2 token, which needs to be validated

  • Return Type

    (IntrospectionResponse | Error)
  • OAuth2 introspection server response or else an oauth2:Error if token validation fails