A Go implementation of JSON Web Tokens (JWT) for signing, verifying, parsing, and generating tokens.
golang-jwt/jwt is a Go implementation of JSON Web Tokens (JWT), a standard for securely transmitting information as JSON objects. It provides a production-ready library for implementing authentication and authorization in Go applications, with a focus on security and compliance with RFC 7519.
Go developers building secure web applications, APIs, or microservices that require token-based authentication and authorization, such as those using OAuth 2.0 Bearer tokens.
Developers choose this library for its robust security defaults, comprehensive support for multiple signing algorithms (HMAC SHA, RSA, RSA-PSS, ECDSA), and extensible design that allows integration with third-party signing providers like cloud KMS or HSMs.
Go implementation of JSON Web Tokens (JWT).
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Blocks unsecured (alg=none) tokens by default and emphasizes validating the alg field to prevent security vulnerabilities, as highlighted in the security notices.
Supports HMAC SHA, RSA, RSA-PSS, and ECDSA signing methods with hooks for custom methods, providing flexibility for various security requirements.
Allows integration with third-party signing providers like cloud KMS and HSMs through the SigningMethod interface, with listed extensions for GCP, AWS, and others.
Adheres to RFC 7519, follows semantic versioning, and provides detailed migration guides for major updates, ensuring long-term maintainability.
Version v5.0.0 introduces major improvements but is not entirely backward compatible, requiring code updates and careful migration, as noted in the README.
Extensions for cloud providers are maintained by third parties, which might lead to inconsistent updates, security vulnerabilities, or lack of official support.
Users must actively validate the alg field and manage key functions, adding complexity and room for error if security best practices are overlooked.