Documentation ¶
Index ¶
- func HandleAuthorizeRequest(c *gin.Context)
- func HandleTokenRequest(c *gin.Context)
- func InitServer(manager oauth2.Manager)
- func SetAccessTokenExpHandler(handler server.AccessTokenExpHandler)
- func SetAllowGetAccessRequest(allow bool)
- func SetAllowedGrantType(types ...oauth2.GrantType)
- func SetAllowedResponseType(types ...oauth2.ResponseType)
- func SetAuthorizeScopeHandler(handler server.AuthorizeScopeHandler)
- func SetClientAuthorizedHandler(handler server.ClientAuthorizedHandler)
- func SetClientInfoHandler(handler server.ClientInfoHandler)
- func SetClientScopeHandler(handler server.ClientScopeHandler)
- func SetExtensionFieldsHandler(handler server.ExtensionFieldsHandler)
- func SetInternalErrorHandler(handler server.InternalErrorHandler)
- func SetPasswordAuthorizationHandler(handler server.PasswordAuthorizationHandler)
- func SetRefreshingScopeHandler(handler server.RefreshingScopeHandler)
- func SetResponseErrorHandler(handler server.ResponseErrorHandler)
- func SetTokenType(tokenType string)
- func SetUserAuthorizationHandler(handler server.UserAuthorizationHandler)
- func TokenAuth(tokenHandle func(c *gin.Context) string) gin.HandlerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleAuthorizeRequest ¶
HandleAuthorizeRequest the authorization request handling
func HandleTokenRequest ¶
HandleTokenRequest token request handling
func SetAccessTokenExpHandler ¶
func SetAccessTokenExpHandler(handler server.AccessTokenExpHandler)
SetAccessTokenExpHandler set expiration date for the access token
func SetAllowGetAccessRequest ¶
func SetAllowGetAccessRequest(allow bool)
SetAllowGetAccessRequest to allow GET requests for the token
func SetAllowedGrantType ¶
func SetAllowedGrantType(types ...oauth2.GrantType)
SetAllowedGrantType allow the grant types
func SetAllowedResponseType ¶
func SetAllowedResponseType(types ...oauth2.ResponseType)
SetAllowedResponseType allow the authorization types
func SetAuthorizeScopeHandler ¶
func SetAuthorizeScopeHandler(handler server.AuthorizeScopeHandler)
SetAuthorizeScopeHandler set scope for the access token
func SetClientAuthorizedHandler ¶
func SetClientAuthorizedHandler(handler server.ClientAuthorizedHandler)
SetClientAuthorizedHandler check the client allows to use this authorization grant type
func SetClientInfoHandler ¶
func SetClientInfoHandler(handler server.ClientInfoHandler)
SetClientInfoHandler get client info from request
func SetClientScopeHandler ¶
func SetClientScopeHandler(handler server.ClientScopeHandler)
SetClientScopeHandler check the client allows to use scope
func SetExtensionFieldsHandler ¶
func SetExtensionFieldsHandler(handler server.ExtensionFieldsHandler)
SetExtensionFieldsHandler in response to the access token with the extension of the field
func SetInternalErrorHandler ¶
func SetInternalErrorHandler(handler server.InternalErrorHandler)
SetInternalErrorHandler internal error handling
func SetPasswordAuthorizationHandler ¶
func SetPasswordAuthorizationHandler(handler server.PasswordAuthorizationHandler)
SetPasswordAuthorizationHandler get user id from username and password
func SetRefreshingScopeHandler ¶
func SetRefreshingScopeHandler(handler server.RefreshingScopeHandler)
SetRefreshingScopeHandler check the scope of the refreshing token
func SetResponseErrorHandler ¶
func SetResponseErrorHandler(handler server.ResponseErrorHandler)
SetResponseErrorHandler response error handling
func SetUserAuthorizationHandler ¶
func SetUserAuthorizationHandler(handler server.UserAuthorizationHandler)
SetUserAuthorizationHandler get user id from request authorization
Types ¶
This section is empty.