2024-04-12 16:41:11 +02:00
|
|
|
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"
|
|
|
|
|
2024-05-23 15:17:05 +02:00
|
|
|
func NewLayer(store sessions.Store, funcs ...OptionFunc) *authn.Layer {
|
|
|
|
opts := NewOptions(funcs...)
|
|
|
|
return authn.NewLayer(LayerType, &Authenticator{
|
|
|
|
httpTransport: opts.HTTPTransport,
|
|
|
|
httpClientTimeout: opts.HTTPClientTimeout,
|
|
|
|
store: store,
|
|
|
|
})
|
2024-04-12 16:41:11 +02:00
|
|
|
}
|