oauth2

package
v0.1.24 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package oauth2 provides token endpoint handlers.

Index

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

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

Jump to

Keyboard shortcuts

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