auth

package
v0.0.0-...-b12e379 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Claims

type Claims struct {
	ID             uuid.UUID                `json:"id"`
	Username       string                   `json:"username"`
	Email          string                   `json:"email"`
	FullName       string                   `json:"full-name"`
	EmailVerified  bool                     `json:"email-verified"`
	ResourceAccess map[string]ResourceRoles `json:"resource-access"`
}

func TokenToClaims

func TokenToClaims(token *oidc.IDToken) (*Claims, error)

func (Claims) HasResourceAccessRole

func (claims Claims) HasResourceAccessRole(resource string, role string) bool

type ResourceRoles

type ResourceRoles struct {
	Roles []string `json:"roles"`
}

Jump to

Keyboard shortcuts

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