Documentation ¶
Index ¶
Constants ¶
View Source
const ( ConsentChallengeKey = "consent.challenge" ConsentEndpointKey = "consent.endpoint" )
View Source
const (
OpenIDConnectKeyName = "hydra.openid.connect"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsentStrategy ¶
type ConsentStrategy interface { ValidateResponse(authorizeRequest fosite.AuthorizeRequester, token string) (claims *Session, err error) IssueChallenge(authorizeRequest fosite.AuthorizeRequester, redirectURL string) (token string, err error) }
type DefaultConsentStrategy ¶
func (*DefaultConsentStrategy) IssueChallenge ¶
func (s *DefaultConsentStrategy) IssueChallenge(authorizeRequest fosite.AuthorizeRequester, redirectURL string) (string, error)
func (*DefaultConsentStrategy) ValidateResponse ¶
func (s *DefaultConsentStrategy) ValidateResponse(a fosite.AuthorizeRequester, token string) (claims *Session, err error)
type Handler ¶
type Handler struct { OAuth2 fosite.OAuth2Provider Consent ConsentStrategy ConsentURL url.URL }
func (*Handler) AuthHandler ¶
func (o *Handler) AuthHandler(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
func (*Handler) SetRoutes ¶
func (h *Handler) SetRoutes(r *httprouter.Router)
func (*Handler) TokenHandler ¶
func (o *Handler) TokenHandler(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
type Session ¶
type Session struct { Subject string `json:"sub"` *strategy.DefaultSession `json:"idToken"` }
Click to show internal directories.
Click to hide internal directories.