Documentation ¶
Index ¶
- Constants
- type ConsentStrategy
- type DefaultConsentStrategy
- type Handler
- func (o *Handler) AuthHandler(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
- func (o *Handler) DefaultConsentHandler(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
- func (h *Handler) SetRoutes(r *httprouter.Router)
- func (o *Handler) TokenHandler(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
- type Session
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 ¶
type DefaultConsentStrategy struct { Issuer string DefaultIDTokenLifespan time.Duration DefaultChallengeLifespan time.Duration KeyManager jwk.Manager }
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 ForcedHTTP bool ConsentURL url.URL }
func (*Handler) AuthHandler ¶
func (o *Handler) AuthHandler(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
func (*Handler) DefaultConsentHandler ¶
func (o *Handler) DefaultConsentHandler(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"` *openid.DefaultSession `json:"idToken"` *oauth2.HMACSession `json:"session"` Extra map[string]interface{} `json:"extra"` }
func NewSession ¶
Click to show internal directories.
Click to hide internal directories.