All checks were successful
Cadoles/bouncer/pipeline/head This commit looks good
21 lines
534 B
Go
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...)
|
|
}
|