Documentation ¶
Overview ¶
Package http provides an HTTP handler for an OAuth 2.0 server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DisableCaching ¶
func DisableCaching(w http.ResponseWriter)
DisableCaching disables HTTP caching on client.
func NewTokenContext ¶
NewTokenContext creates a new instance of TokenContext based on specified gin context.
Types ¶
type TokenServer ¶
type TokenServer struct {
// contains filtered or unexported fields
}
A TokenServer represents a HTTP server for TokenService.
func NewTokenServer ¶
func NewTokenServer(svcToken *oauth.TokenService) *TokenServer
NewTokenServer creates a new instance of TokenServer.
func (*TokenServer) AccessTokenRequest ¶
func (srv *TokenServer) AccessTokenRequest( w http.ResponseWriter, r *http.Request, )
AccessTokenRequest is a endpoint that receives a request to create a new access token.
func (*TokenServer) SetHandler ¶
func (srv *TokenServer) SetHandler(grantType string, handler oauth.TokenHandlerFunc)
SetHandler register a new handler for specified grant type.
Click to show internal directories.
Click to hide internal directories.