19 lines
502 B
Go
19 lines
502 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...)
|
|
return authn.NewLayer(LayerType, &Authenticator{
|
|
httpTransport: opts.HTTPTransport,
|
|
httpClientTimeout: opts.HTTPClientTimeout,
|
|
store: store,
|
|
})
|
|
}
|