ginserver

package
v0.0.0-...-4c735e4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 11, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleAuthorizeRequest

func HandleAuthorizeRequest(c *gin.Context)

HandleAuthorizeRequest the authorization request handling

func HandleTokenRequest

func HandleTokenRequest(c *gin.Context)

HandleTokenRequest token request handling

func HandleTokenVerify

func HandleTokenVerify() gin.HandlerFunc

HandleTokenVerify Verify the access token of the middleware

func InitServer

func InitServer(manager oauth2.Manager) *server.Server

InitServer Initialize the service

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 SetTokenType

func SetTokenType(tokenType string)

SetTokenType token type

func SetUserAuthorizationHandler

func SetUserAuthorizationHandler(handler server.UserAuthorizationHandler)

SetUserAuthorizationHandler get user id from request authorization

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL