Documentation ¶
Index ¶
- func Authorize(ctx context.Context, object string, action Action) error
- func EmailFromContext(ctx context.Context) string
- func GroupsFromContext(ctx context.Context) map[string]bool
- func StreamAuthnInterceptor(a Authenticator) grpc.StreamServerInterceptor
- func UnaryAuthnInterceptor(a Authenticator) grpc.UnaryServerInterceptor
- type Action
- type Authenticator
- type GroupCache
- type GroupGetter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EmailFromContext ¶
func StreamAuthnInterceptor ¶
func StreamAuthnInterceptor(a Authenticator) grpc.StreamServerInterceptor
func UnaryAuthnInterceptor ¶
func UnaryAuthnInterceptor(a Authenticator) grpc.UnaryServerInterceptor
Types ¶
type Authenticator ¶
func NewAuthenticator ¶
func NewAuthenticator(cfg *config.Config, gg GroupGetter) (Authenticator, error)
type GroupCache ¶
type GroupCache struct {
// contains filtered or unexported fields
}
func NewCache ¶
func NewCache(gg GroupGetter) *GroupCache
func (*GroupCache) GroupsForUser ¶
func (gc *GroupCache) GroupsForUser(username string) (map[string]bool, error)
Click to show internal directories.
Click to hide internal directories.