tokens

package
v2.0.0-beta3+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2018 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CookieName      = "R_SESS"
	AuthHeaderName  = "Authorization"
	AuthValuePrefix = "Bearer"
	BasicAuthPrefix = "Basic"
)
View Source
const (
	UserIDLabel = "authn.management.cattle.io/token-userId"
)

Variables

This section is empty.

Functions

func ConvertTokenResource

func ConvertTokenResource(schema *types.Schema, token v3.Token) (map[string]interface{}, error)

func CreateTokenAndSetCookie

func CreateTokenAndSetCookie(userID string, userPrincipal v3.Principal, groupPrincipals []v3.Principal, providerInfo map[string]string, ttl int, description string, request *types.APIContext) error

func GetTokenAuthFromRequest

func GetTokenAuthFromRequest(req *http.Request) string

func IsExpired

func IsExpired(token v3.Token) bool

func NewAPIHandler

func NewAPIHandler(ctx context.Context, apiContext *config.ScaledContext) (http.Handler, error)

func NewLoginToken

func NewLoginToken(userID string, userPrincipal v3.Principal, groupPrincipals []v3.Principal, providerInfo map[string]string, ttl int64, description string) (v3.Token, error)

func NewTokenAPIServer

func NewTokenAPIServer(ctx context.Context, apiContext *config.ScaledContext) error

func SetTokenExpiresAt

func SetTokenExpiresAt(token *v3.Token)

func SplitTokenParts

func SplitTokenParts(tokenID string) (string, string)

func StartPurgeDaemon

func StartPurgeDaemon(ctx context.Context, mgmt *config.ManagementContext)

Types

This section is empty.

Jump to

Keyboard shortcuts

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