Documentation
¶
Index ¶
- Constants
- Variables
- func AuthInterceptor(needAuth bool, oidcVerifier *oidc.IDTokenVerifier, ...) gin.HandlerFunc
- func AuthInterceptorInGraphql(needAuth bool, oidcVerifier *oidc.IDTokenVerifier) gin.HandlerFunc
- func AuthTokenIsValid(needAuth bool, oidcVerifier *oidc.IDTokenVerifier) gin.HandlerFunc
- func ForOIDCToken(ctx context.Context) *string
- type User
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 ¶
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"`
}
Click to show internal directories.
Click to hide internal directories.