GoAuth2 is an Oauth2 server implementation written in Golang. Currently authorization code, implicit, and client credentials grant, and password grant types are supported.
GoAuth2 issues a compressed enhanced JWT token that can be used to secure individual REST endpoints for users using roles. REST endpoints can be coded to validate the JWT token using the user's role. There is also a access token REST service that can validate a compressed token. Token compression can be turned off at startup if desired.