auth

package
v0.2.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	UserNameContextKey contextKey = "userName"
)

Variables

View Source
var NeedAuth bool

Functions

func AuthInterceptor

func AuthInterceptor(needAuth bool, oidcVerifier *oidc.IDTokenVerifier, groupVersion schema.GroupVersion, verb, resources string) gin.HandlerFunc

func AuthInterceptorInGraphql added in v0.2.0

func AuthInterceptorInGraphql(needAuth bool, oidcVerifier *oidc.IDTokenVerifier) gin.HandlerFunc

func AuthTokenIsValid added in v0.2.2

func AuthTokenIsValid(needAuth bool, oidcVerifier *oidc.IDTokenVerifier) gin.HandlerFunc

func ForOIDCToken

func ForOIDCToken(ctx context.Context) *string

Types

type User

type User struct {
	Name        string            `json:"name"`
	Password    string            `json:"password,omitempty"`
	Email       string            `json:"email"`
	Phone       string            `json:"phone"`
	Description string            `json:"description"`
	Groups      []string          `json:"groups"`
	Role        string            `json:"role,omitempty"`
	CreateTime  string            `json:"creationTimestamp,omitempty"`
	Type        string            `json:"type"`
	Subject     string            `json:"sub,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`
}

Jump to

Keyboard shortcuts

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