You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
package serverimport ( "github.com/go-oauth2/oauth2/v4")// SetTokenType token typefunc (s *Server) SetTokenType(tokenType string) { s.Config.TokenType = tokenType}// SetAllowGetAccessRequest to allow GET requests for the tokenfunc (s *Server) SetAllowGetAccessRequest(allow bool) { s.Config.AllowGetAccessRequest = allow}// SetAllowedResponseType allow the authorization typesfunc (s *Server) SetAllowedResponseType(types ...oauth2.ResponseType) { s.Config.AllowedResponseTypes = types}// SetAllowedGrantType allow the grant typesfunc (s *Server) SetAllowedGrantType(types ...oauth2.GrantType) { s.Config.AllowedGrantTypes = types}// SetClientInfoHandler get client info from requestfunc (s *Server) SetClientInfoHandler(handler ClientInfoHandler) { s.ClientInfoHandler = handler}// SetClientAuthorizedHandler check the client allows to use this authorization grant typefunc (s *Server) SetClientAuthorizedHandler(handler ClientAuthorizedHandler) { s.ClientAuthorizedHandler = handler}// SetClientScopeHandler check the client allows to use scopefunc (s *Server) SetClientScopeHandler(handler ClientScopeHandler) { s.ClientScopeHandler = handler}// SetUserAuthorizationHandler get user id from request authorizationfunc (s *Server) SetUserAuthorizationHandler(handler UserAuthorizationHandler) { s.UserAuthorizationHandler = handler}// SetPasswordAuthorizationHandler get user id from username and passwordfunc (s *Server) SetPasswordAuthorizationHandler(handler PasswordAuthorizationHandler) { s.PasswordAuthorizationHandler = handler}// SetRefreshingScopeHandler check the scope of the refreshing tokenfunc (s *Server) SetRefreshingScopeHandler(handler RefreshingScopeHandler) { s.RefreshingScopeHandler = handler}// SetResponseErrorHandler response error handlingfunc (s *Server) SetResponseErrorHandler(handler ResponseErrorHandler) { s.ResponseErrorHandler = handler}// SetInternalErrorHandler internal error handlingfunc (s *Server) SetInternalErrorHandler(handler InternalErrorHandler) { s.InternalErrorHandler = handler}// SetExtensionFieldsHandler in response to the access token with the extension of the fieldfunc (s *Server) SetExtensionFieldsHandler(handler ExtensionFieldsHandler) { s.ExtensionFieldsHandler = handler}// SetAccessTokenExpHandler set expiration date for the access tokenfunc (s *Server) SetAccessTokenExpHandler(handler AccessTokenExpHandler) { s.AccessTokenExpHandler = handler}// SetAuthorizeScopeHandler set scope for the access tokenfunc (s *Server) SetAuthorizeScopeHandler(handler AuthorizeScopeHandler) { s.AuthorizeScopeHandler = handler}
0 commit comments