group

package
v0.20.7-rc.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2021 License: Apache-2.0 Imports: 4 Imported by: 154

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAuthenticatedGroupAdder

func NewAuthenticatedGroupAdder(auth authenticator.Request) authenticator.Request

NewAuthenticatedGroupAdder wraps a request authenticator, and adds the system:authenticated group when appropriate. Authentication must succeed, the user must not be system:anonymous, the groups system:authenticated or system:unauthenticated must not be present

func NewGroupAdder

func NewGroupAdder(auth authenticator.Request, groups []string) authenticator.Request

NewGroupAdder wraps a request authenticator, and adds the specified groups to the returned user when authentication succeeds

func NewTokenGroupAdder

func NewTokenGroupAdder(auth authenticator.Token, groups []string) authenticator.Token

NewTokenGroupAdder wraps a token authenticator, and adds the specified groups to the returned user when authentication succeeds

Types

type AuthenticatedGroupAdder

type AuthenticatedGroupAdder struct {
	// Authenticator is delegated to make the authentication decision
	Authenticator authenticator.Request
}

AuthenticatedGroupAdder adds system:authenticated group when appropriate

func (*AuthenticatedGroupAdder) AuthenticateRequest

func (g *AuthenticatedGroupAdder) AuthenticateRequest(req *http.Request) (*authenticator.Response, bool, error)

type GroupAdder

type GroupAdder struct {
	// Authenticator is delegated to make the authentication decision
	Authenticator authenticator.Request
	// Groups are additional groups to add to the user.Info from a successful authentication
	Groups []string
}

GroupAdder adds groups to an authenticated user.Info

func (*GroupAdder) AuthenticateRequest

func (g *GroupAdder) AuthenticateRequest(req *http.Request) (*authenticator.Response, bool, error)

type TokenGroupAdder

type TokenGroupAdder struct {
	// Authenticator is delegated to make the authentication decision
	Authenticator authenticator.Token
	// Groups are additional groups to add to the user.Info from a successful authentication
	Groups []string
}

TokenGroupAdder adds groups to an authenticated user.Info

func (*TokenGroupAdder) AuthenticateToken

func (g *TokenGroupAdder) AuthenticateToken(ctx context.Context, token string) (*authenticator.Response, bool, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL