Documentation ¶
Overview ¶
Package ginhttp provides an HTTP handler for an OAuth 2.0 server (gin-gonic/gin).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TokenServer ¶
type TokenServer struct {
// contains filtered or unexported fields
}
A TokenServer represents a gin-backed HTTP server for TokenService.
func NewTokenServer ¶
func NewTokenServer(svcToken *oauth.TokenService) *TokenServer
NewTokenServer creates a new instance of TokenServer.
func (*TokenServer) AccessTokenRequest ¶
func (s *TokenServer) AccessTokenRequest(c *gin.Context)
AccessTokenRequest is a endpoint that receives a request to create a new access token.
func (*TokenServer) SetHandler ¶
func (s *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.