Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetClaims ¶
func GetClaims(ctx context.Context) (*types.TokenClaims, bool)
GetClaims extracts OAuth claims from a request context
Types ¶
type OAuth2Server ¶
type OAuth2Server struct {
// contains filtered or unexported fields
}
OAuth2Server implements an OAuth 2.1 resource server
func NewOAuth2Server ¶
func NewOAuth2Server(config *types.OAuth2Config, baseURL string, logger *logrus.Logger) (*OAuth2Server, error)
NewOAuth2Server creates a new OAuth 2.1 server
func (*OAuth2Server) AuthenticateRequest ¶
func (s *OAuth2Server) AuthenticateRequest(ctx context.Context, r *http.Request) *types.AuthenticationResult
AuthenticateRequest authenticates an HTTP request using OAuth 2.1
func (*OAuth2Server) CreateMiddleware ¶
func (s *OAuth2Server) CreateMiddleware() func(http.Handler) http.Handler
CreateMiddleware creates an HTTP middleware for OAuth 2.1 authentication
func (*OAuth2Server) RegisterHandlers ¶
func (s *OAuth2Server) RegisterHandlers(mux *http.ServeMux)
RegisterHandlers registers OAuth 2.1 endpoints with an HTTP mux
Click to show internal directories.
Click to hide internal directories.