oauth2
A fundamental and extendable OAuth2 library for Go.
Package oauth2
provides structures and functions to implement OAuth2 compatible authentication servers. The library can be used standalone or with any framework as it is built on top of the standard Go http library.
Specifications
The library considers and implements the following specifications:
- OAuth 2.0 Framework - RFC 6749
- Bearer Token Usage - RFC 6750
- Threat Model and Security Considerations - RFC 6819
- Token Revocation - RFC 7009
- Token Introspection - RFC 7662
Example
The test server implements a basic but feature-complete in-memory OAuth2 authentication server. The code can be used as a template to build a custom implementation of an OAuth2 compatible authentication server.
Installation
Get the package using the go tool:
$ go get -u github.com/256dpi/oauth2/v2
License
The MIT License (MIT)
Copyright (c) 2016 Joël Gähwiler