Post

Visualizzazione dei post da gennaio, 2017

OAuth 2.0 Server & Authorization Middleware for Gin-Gonic

Project OAuth OAuth is an open source project developed in Go and available on GitHub .  The project offers an Authorization Server and an Authorization Middleware that can be used to make secure access to resources API and provide a simple and efficient implementation of the OAuth 2.0 specification. Authorization Server and Middleware are both based on Gin-Gonic and can interoperate with any other middleware available for this framework.  Authorization Server The Authorization Server is implemented by the struct OAuthBearerServer that manages two grant types of authorizations: password and client_credentials. This Authorization Server is made to provide authorization token usable for consuming resources API. Developers need only add their own implementation of CredentialsVerifier interface to validate the credentials of users or applications that require a token. package main import (  "errors"  "time"  "gopkg.in/gin-gonic/gin.v1"...