Object -
oauth2
:
InboundOAuth2Provider
Represents the inbound OAuth2 provider, which calls the introspection server, validates the received credentials,
and performs authentication and authorization. The oauth2:InboundOAuth2Provider
is an implementation of the
auth:InboundAuthProvider
interface.
oauth2:IntrospectionServerConfig introspectionServerConfig = {
url: "https://localhost:9196/oauth2/token/introspect"
};
oauth2:InboundOAuth2Provider inboundOAuth2Provider = new(introspectionServerConfig);
Constructor
__init
(IntrospectionServerConfig config)
- config IntrospectionServerConfig
-
OAuth2 introspection server configurations
Methods
Authenticates the provider OAuth2 tokens with an introspection endpoint.
Fields
- introspectionClient Client
-
Introspection client endpoint
- tokenTypeHint string?
-
A hint about the type of the token submitted for introspection
Authenticates the provider OAuth2 tokens with an introspection endpoint.
boolean|auth:Error result = inboundOAuth2Provider.authenticate("<credential>");
Parameters
- credential string
-
OAuth2 token to be authenticated
-
Return Type
(boolean | Error) true
if authentication is successful,false
otherwise, or else anauth:Error
if an error occurred