Documentation ¶
Index ¶
- Variables
- type DefaultSession
- type DefaultStrategy
- type IDTokenHandleHelper
- type OpenIDConnectExplicitHandler
- func (c *OpenIDConnectExplicitHandler) HandleAuthorizeEndpointRequest(ctx context.Context, req *http.Request, ar fosite.AuthorizeRequester, ...) error
- func (c *OpenIDConnectExplicitHandler) HandleTokenEndpointRequest(ctx context.Context, r *http.Request, request fosite.AccessRequester) error
- func (c *OpenIDConnectExplicitHandler) PopulateTokenEndpointResponse(ctx context.Context, req *http.Request, requester fosite.AccessRequester, ...) error
- type OpenIDConnectHybridHandler
- type OpenIDConnectImplicitHandler
- type OpenIDConnectRequestStorage
- type OpenIDConnectTokenStrategy
- type Session
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidSession = errors.New("Session type mismatch")
)
View Source
var ErrNoSessionFound = fosite.ErrNotFound
Functions ¶
This section is empty.
Types ¶
type DefaultSession ¶
type DefaultSession struct { Claims *jwt.IDTokenClaims Headers *jwt.Headers }
IDTokenSession is a session container for the id token
func (*DefaultSession) IDTokenClaims ¶
func (s *DefaultSession) IDTokenClaims() *jwt.IDTokenClaims
func (*DefaultSession) IDTokenHeaders ¶
func (s *DefaultSession) IDTokenHeaders() *jwt.Headers
type DefaultStrategy ¶
type DefaultStrategy struct { *jwt.RS256JWTStrategy Expiry time.Duration Issuer string }
type IDTokenHandleHelper ¶
type IDTokenHandleHelper struct {
IDTokenStrategy OpenIDConnectTokenStrategy
}
func (*IDTokenHandleHelper) IssueExplicitIDToken ¶
func (i *IDTokenHandleHelper) IssueExplicitIDToken(ctx context.Context, req *http.Request, ar fosite.Requester, resp fosite.AccessResponder) error
func (*IDTokenHandleHelper) IssueImplicitIDToken ¶
func (i *IDTokenHandleHelper) IssueImplicitIDToken(ctx context.Context, req *http.Request, ar fosite.Requester, resp fosite.AuthorizeResponder) error
type OpenIDConnectExplicitHandler ¶
type OpenIDConnectExplicitHandler struct { // OpenIDConnectRequestStorage is the storage for open id connect sessions. OpenIDConnectRequestStorage OpenIDConnectRequestStorage *IDTokenHandleHelper }
func (*OpenIDConnectExplicitHandler) HandleAuthorizeEndpointRequest ¶
func (c *OpenIDConnectExplicitHandler) HandleAuthorizeEndpointRequest(ctx context.Context, req *http.Request, ar fosite.AuthorizeRequester, resp fosite.AuthorizeResponder) error
func (*OpenIDConnectExplicitHandler) HandleTokenEndpointRequest ¶
func (c *OpenIDConnectExplicitHandler) HandleTokenEndpointRequest(ctx context.Context, r *http.Request, request fosite.AccessRequester) error
func (*OpenIDConnectExplicitHandler) PopulateTokenEndpointResponse ¶
func (c *OpenIDConnectExplicitHandler) PopulateTokenEndpointResponse(ctx context.Context, req *http.Request, requester fosite.AccessRequester, responder fosite.AccessResponder) error
type OpenIDConnectHybridHandler ¶
type OpenIDConnectHybridHandler struct { AuthorizeImplicitGrantTypeHandler *oauth2.AuthorizeImplicitGrantTypeHandler AuthorizeExplicitGrantHandler *oauth2.AuthorizeExplicitGrantHandler IDTokenHandleHelper *IDTokenHandleHelper ScopeStrategy fosite.ScopeStrategy Enigma *jwt.RS256JWTStrategy }
func (*OpenIDConnectHybridHandler) HandleAuthorizeEndpointRequest ¶
func (c *OpenIDConnectHybridHandler) HandleAuthorizeEndpointRequest(ctx context.Context, req *http.Request, ar fosite.AuthorizeRequester, resp fosite.AuthorizeResponder) error
type OpenIDConnectImplicitHandler ¶
type OpenIDConnectImplicitHandler struct { AuthorizeImplicitGrantTypeHandler *oauth2.AuthorizeImplicitGrantTypeHandler *IDTokenHandleHelper ScopeStrategy fosite.ScopeStrategy RS256JWTStrategy *jwt.RS256JWTStrategy }
func (*OpenIDConnectImplicitHandler) HandleAuthorizeEndpointRequest ¶
func (c *OpenIDConnectImplicitHandler) HandleAuthorizeEndpointRequest(ctx context.Context, req *http.Request, ar fosite.AuthorizeRequester, resp fosite.AuthorizeResponder) error
type OpenIDConnectRequestStorage ¶
type OpenIDConnectRequestStorage interface { // CreateOpenIDConnectSession creates an open id connect session // for a given authorize code. This is relevant for explicit open id connect flow. CreateOpenIDConnectSession(ctx context.Context, authorizeCode string, requester fosite.Requester) error // IsOpenIDConnectSession returns error // - nil if a session was found, // - ErrNoSessionFound if no session was found // - or an arbitrary error if an error occurred. GetOpenIDConnectSession(ctx context.Context, authorizeCode string, requester fosite.Requester) (fosite.Requester, error) // DeleteOpenIDConnectSession removes an open id connect session from the store. DeleteOpenIDConnectSession(ctx context.Context, authorizeCode string) error }
Click to show internal directories.
Click to hide internal directories.