William Petit 692523e54f
All checks were successful
Cadoles/bouncer/pipeline/head This commit looks good
feat: prevent call bursts on oidc provider refresh
2025-03-18 15:51:25 +01:00

21 lines
534 B
Go

package oidc
import (
"forge.cadoles.com/cadoles/bouncer/internal/proxy/director/layer/authn"
"forge.cadoles.com/cadoles/bouncer/internal/store"
"github.com/gorilla/sessions"
)
const LayerType store.LayerType = "authn-oidc"
func NewLayer(store sessions.Store, funcs ...OptionFunc) *authn.Layer {
opts := NewOptions(funcs...)
authenticator := NewAuthenticator(
opts.HTTPTransport,
opts.HTTPClientTimeout,
store,
opts.OIDCProviderCacheTimeout,
)
return authn.NewLayer(LayerType, authenticator, opts.AuthnOptions...)
}