go.bigb.es/curator
Index
- type Provider
- func New(ctx context.Context, cfg *config.OIDCConfig, clientSecret string) (*Provider, error)
- func (*Provider) CallbackHandler(w http.ResponseWriter, r *http.Request)
- func (*Provider) LoginHandler(w http.ResponseWriter, r *http.Request)
- func (*Provider) LogoutHandler(w http.ResponseWriter, r *http.Request)
- func (*Provider) ValidateSession(value string) string
Types
type Provider struct { // contains filtered or unexported fields }
func New(ctx context.Context, cfg *config.OIDCConfig, clientSecret string) (*Provider, error)
New creates an OIDC provider by performing discovery on the issuer.
func (p *Provider) CallbackHandler(w http.ResponseWriter, r *http.Request)
CallbackHandler handles the OIDC callback, exchanges the code, and sets a session cookie.
func (p *Provider) LoginHandler(w http.ResponseWriter, r *http.Request)
LoginHandler redirects to the OIDC provider's authorization endpoint.
func (p *Provider) LogoutHandler(w http.ResponseWriter, r *http.Request)
LogoutHandler clears the session cookie and redirects to the admin login.
Provider handles OIDC authentication for the admin UI.