Documentation ¶
Index ¶
- Constants
- func Bearer(dbPortal database.Portal) func(http.Handler) http.Handler
- func Log(env env.Core, auditLog, baseLog *logrus.Entry) func(http.Handler) http.Handler
- func NewAAD(log *logrus.Entry, audit *logrus.Entry, env env.Core, ...) (*aad, error)
- func Panic(log *logrus.Entry) func(http.Handler) http.Handler
- type AAD
Constants ¶
View Source
const ( SessionName = "session" // Expiration time in unix format SessionKeyExpires = "expires" SessionKeyUsername = "user_name" SessionKeyGroups = "groups" )
View Source
const ( ContextKeyUsername contextKey = iota ContextKeyGroups ContextKeyPortalDoc )
Variables ¶
This section is empty.
Functions ¶
func Bearer ¶
Bearer validates a Bearer token and adds the corresponding username to the context if it checks out. It lets the request through regardless (this is so that failures can be logged).
func NewAAD ¶
func NewAAD(log *logrus.Entry, audit *logrus.Entry, env env.Core, baseAccessLog *logrus.Entry, hostname string, sessionKey []byte, clientID string, clientKey *rsa.PrivateKey, clientCerts []*x509.Certificate, allGroups []string, unauthenticatedRouter *mux.Router, verifier oidc.Verifier) (*aad, error)
Types ¶
Click to show internal directories.
Click to hide internal directories.