authorization

package
v0.0.0-...-d88c78e Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsUnauthorized

func IsUnauthorized(err error) bool

Types

type Identity

type Identity struct {
	Name string
	Kind string
}

type IdentityInspector

type IdentityInspector interface {
	WhoAmI(context.Context, string) (Identity, error)
}

func NewTokenReviewer

func NewTokenReviewer(client client.Client) IdentityInspector

type IdentityProvider

type IdentityProvider struct {
	// contains filtered or unexported fields
}

func NewIdentityProvider

func NewIdentityProvider(tokenInspector IdentityInspector) *IdentityProvider

func (*IdentityProvider) GetIdentity

func (p *IdentityProvider) GetIdentity(ctx context.Context, authorizationHeader string) (Identity, error)

type Org

type Org struct {
	// contains filtered or unexported fields
}

func NewOrg

func NewOrg(k8sClient client.Client) *Org

func (*Org) GetAuthorizedNamespaces

func (o *Org) GetAuthorizedNamespaces(ctx context.Context, identity Identity) ([]string, error)

type UnauthorizedErr

type UnauthorizedErr struct{}

func (UnauthorizedErr) Error

func (e UnauthorizedErr) Error() string

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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