Documentation
¶
Overview ¶
Package oidcprovider adapts the transport-neutral OIDC provider core to Gin.
Index ¶
- type AuthenticationResolver
- type Handler
- func (h *Handler) Authorize(c *gin.Context)
- func (h *Handler) ConsentDecision(c *gin.Context)
- func (h *Handler) ConsentDetails(c *gin.Context)
- func (h *Handler) Discovery(c *gin.Context)
- func (h *Handler) JWKS(c *gin.Context)
- func (h *Handler) ResumeAuthorization(c *gin.Context)
- func (h *Handler) Revoke(c *gin.Context)
- func (h *Handler) Token(c *gin.Context)
- func (h *Handler) UserInfo(c *gin.Context)
- func (h *Handler) WithInteractions(store interactionStore, now func() time.Time, random io.Reader) *Handler
- func (h *Handler) WithLoginPath(path string) *Handler
- type ProviderGetter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthenticationResolver ¶
type AuthenticationResolver func(*gin.Context) core.Authentication
AuthenticationResolver supplies trusted GooseForum login state to the authorization endpoint. AuthTime must be the actual authentication time; resolvers that cannot prove it must return a zero Authentication value.
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func New ¶
func New(provider ProviderGetter, authenticate AuthenticationResolver) (*Handler, error)
func (*Handler) ConsentDecision ¶
ConsentDecision atomically consumes an interaction before acting on its persisted request. The browser cannot replace any authorization parameter.
func (*Handler) ConsentDetails ¶
ConsentDetails returns display-only data derived from the persisted trusted authorization request. It never returns redirect_uri, state, nonce, or PKCE.
func (*Handler) ResumeAuthorization ¶
ResumeAuthorization completes a trusted reauthentication interaction. The browser supplies only an opaque handle; the authorization request is loaded from the database and the handle is consumed exactly once.
func (*Handler) WithInteractions ¶
func (*Handler) WithLoginPath ¶
WithLoginPath changes the local page used to resume an unauthenticated authorization request. The path must remain local to GooseForum.