Documentation ¶
Overview ¶
Package oauth2 provides token endpoint handlers.
Index ¶
- func NewClientCredentialsHandlerFactory(config fositex.OAuth2Configurator, store any, strategy any) any
- type ClientCredentialsGrantHandler
- func (c *ClientCredentialsGrantHandler) CanHandleTokenEndpointRequest(_ context.Context, requester fosite.AccessRequester) bool
- func (c *ClientCredentialsGrantHandler) CanSkipClientAuth(_ context.Context, _ fosite.AccessRequester) bool
- func (c *ClientCredentialsGrantHandler) HandleTokenEndpointRequest(ctx context.Context, request fosite.AccessRequester) error
- func (c *ClientCredentialsGrantHandler) PopulateTokenEndpointResponse(ctx context.Context, request fosite.AccessRequester, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClientCredentialsHandlerFactory ¶
func NewClientCredentialsHandlerFactory(config fositex.OAuth2Configurator, store any, strategy any) any
NewClientCredentialsHandlerFactory is a fositex.Factory that produces a handler for the 'client_credentials' grant type.
Types ¶
type ClientCredentialsGrantHandler ¶
type ClientCredentialsGrantHandler struct { *oauth2.HandleHelper storage.TransactionManager Config clientCredentialsConfigurator // contains filtered or unexported fields }
ClientCredentialsGrantHandler handles the RFC6749 client credentials grant type.
func (*ClientCredentialsGrantHandler) CanHandleTokenEndpointRequest ¶
func (c *ClientCredentialsGrantHandler) CanHandleTokenEndpointRequest(_ context.Context, requester fosite.AccessRequester) bool
CanHandleTokenEndpointRequest checks if this handler can handle the request.
func (*ClientCredentialsGrantHandler) CanSkipClientAuth ¶
func (c *ClientCredentialsGrantHandler) CanSkipClientAuth(_ context.Context, _ fosite.AccessRequester) bool
CanSkipClientAuth determines if the client must be authenticated to use this handler.
func (*ClientCredentialsGrantHandler) HandleTokenEndpointRequest ¶
func (c *ClientCredentialsGrantHandler) HandleTokenEndpointRequest(ctx context.Context, request fosite.AccessRequester) error
HandleTokenEndpointRequest implements https://tools.ietf.org/html/rfc6749#section-4.4.2
func (*ClientCredentialsGrantHandler) PopulateTokenEndpointResponse ¶
func (c *ClientCredentialsGrantHandler) PopulateTokenEndpointResponse(ctx context.Context, request fosite.AccessRequester, response fosite.AccessResponder) error
PopulateTokenEndpointResponse implements https://tools.ietf.org/html/rfc6749#section-4.4.3
Click to show internal directories.
Click to hide internal directories.