What is Ballerina?
Swan Lake



import ballerina/jwt;

Package Overview

The jwt library is one of the standard library modules of the Ballerina language.

This module provides a framework for authentication/authorization with JWTs and generation/validation of JWTs as specified in the RFC 7519, RFC 7515, and RFC 7517.

JSON Web Token (JWT) is a compact, URL-safe means of representing claims to be transferred between two parties. The claims in a JWT are encoded as a JSON object that is used as the payload of a JSON Web Signature (JWS) structure or as the plaintext of a JSON Web Encryption (JWE) structure, enabling the claims to be signed digitally or protecting the integrity with a Message Authentication Code(MAC) and/or encrypted.

The Ballerina jwt module facilitates auth providers that are to be used by the clients and listeners of different protocol connectors. Also, it provides the APIs for issuing a self-signed JWT and validating a JWT.

Report Issues

To report bugs, request new features, start new discussions, view project boards, etc., go to the Ballerina standard library parent repository.

Useful Links

Exported Modules


Created Date: 06 July,2021

Ballerina Compatibility

Platform: java11

Other Versions