Object - oauth2 : OutboundOAuth2Provider

Represents outbound OAuth2 provider.

Constructor

__init

(ClientCredentialsGrantConfig | PasswordGrantConfig | DirectTokenConfig oauth2ProviderConfig)

Methods

Fields

generateToken

()

returns string | AuthError

Generate token for OAuth2 authentication.

  • Return Type

    (string | AuthError)
  • Generated token or auth:AuthError if an error occurred

inspect

(map data)

returns string | AuthError | ()

Inspect the incoming data and generate the token for OAuth2 authentication.

Parameters

  • data map
  • Map of data which is extracted from the HTTP response

  • Return Type

    (string | AuthError | ())
  • String token, or auth:AuthError occurred when generating token or () if nothing to be returned