ballerina/oauth2

Package Overview

This package provides a listener OAuth2 authentication provider, which can be used to authenticate the provided credentials against an introspection endpoint, and a client OAuth2 authentication provider, which can be used to authenticate against an external endpoint.

For information on the operations, which you can perform with this package, see the below Functions. For examples on the usage of the operations, see the following.

Classes

[2]

ClientOAuth2Provider

Represents the client OAuth2 provider, which generates OAuth2 tokens.

ListenerOAuth2Provider

Represents the inbound OAuth2 provider, which calls the introspection server, validates the received credentials, and performs authentication and authorization.

Records

[8]

CertKey

Represents combination of certificate, private key and private key password if encrypted.

ClientConfiguration

Represents the configurations of the client used to call the introspection endpoint.

ClientCredentialsGrantConfig

The data structure, which is used to configure the OAuth2 client credentials grant type.

IntrospectionConfig

Represents the introspection server configurations.

IntrospectionResponse

Represents the introspection server response.

PasswordGrantConfig

The data structure, which is used to configure the OAuth2 password grant type.

RefreshTokenGrantConfig

The data structure, which can be used to configure OAuth2 refresh token grant type.

SecureSocket

Represents the SSL/TLS configurations.

Enums

[2]

CredentialBearer

Represents HTTP versions.

HttpVersion

Represents HTTP versions.

Types

[2]

ClientAuth

Defines the authentication configuration types for the HTTP client used for token introspection.

GrantConfig

Represents the grant type configurations supported for OAuth2.

Errors

[1]

Error

Represents the OAuth2 error.