Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UserDirectory ¶
type UserDirectory struct {
// contains filtered or unexported fields
}
UserDirectory is for authorizing users against Google's Gsuite
func NewUserDirectory ¶
func NewUserDirectory(authJSON []byte, adminUsername, domain string, authorizedGroups []string, redisHost string, duration time.Duration) (*UserDirectory, error)
NewUserDirectory returns a user directory
func (*UserDirectory) Authorize ¶
func (d *UserDirectory) Authorize(userFunc func(context.Context) (string, bool)) middlewares.Middleware
Authorize is a middleware for authenticating handlers. It accepts a func that takes a context and provides a username
func (*UserDirectory) AuthorizeUser ¶
func (d *UserDirectory) AuthorizeUser(user string) (bool, error)
AuthorizeUser checks the authorization for a given user
Click to show internal directories.
Click to hide internal directories.