ballerina/jwt1.1.0-alpha8
Package Overview
This package provides a listener JWT authentication provider, which can be used to authenticate the provided credentials against the provided JWT validator configurations, and a client self-signed JWT authentication provider, which can be used to authenticate against an external endpoint with a self-signed JWT issued against the provided JWT issuer configurations. Also, this module provides the functionality related to issuing and validating a JWT.
For information on the operations, which you can perform with this module, see the below Functions. For examples on the usage of the operations, see the following.
- JWT Issue/Validate Example
- HTTP Service with JWT Auth Example
- HTTP Client with Self Signed JWT Auth Example
- HTTP Client with Bearer Token Auth Example
Functions
[3]
decode | Decodes the provided JWT string. |
issue | Issues a JWT based on the provided configurations. |
validate | Validates the provided JWT, against the provided configurations. |
Classes
[2]
ClientSelfSignedJwtAuthProvider | Represents the client JWT Auth provider, which is used to authenticate with an external endpoint by issuing a self-signed JWT. |
ListenerJwtAuthProvider | Represents the listener JWT Auth provider, which authenticates by validating a JWT. |
Records
[9]
CertKey | Represents combination of certificate, private key and private key password if encrypted. |
ClientConfiguration | Represents the configurations of the client used to call the JWKS endpoint. |
Header | Represents JWT header. |
IssuerConfig | Represents JWT issuer configurations. |
IssuerSignatureConfig | Represents JWT signature configurations. |
Payload | Represents JWT payload. |
SecureSocket | Represents the SSL/TLS configurations. |
ValidatorConfig | Represents JWT validator configurations. |
ValidatorSignatureConfig | Represents JWT signature configurations. |
Constants
[4]
NONE | Unsecured JWS (no signing). |
RS256 | The |
RS384 | The |
RS512 | The |
Enums
[1]
HttpVersion | Represents HTTP versions. |
Types
[1]
SigningAlgorithm | The cryptographic algorithms used to secure the JWS. |
Errors
[1]
Error | Represents the JWT error. |