types

package
v4.0.16 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 5 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Claims

type Claims struct {
	jwt.Claims
	Groups                  []string               `json:"groups,omitempty"`
	Email                   string                 `json:"email,omitempty"`
	EmailVerified           bool                   `json:"-"`
	Name                    string                 `json:"name,omitempty"`
	ServiceAccountName      string                 `json:"service_account_name,omitempty"`
	ServiceAccountNamespace string                 `json:"service_account_namespace,omitempty"`
	PreferredUsername       string                 `json:"preferred_username,omitempty"`
	RawClaim                map[string]interface{} `json:"-"`
}

func (*Claims) GetCustomGroup

func (c *Claims) GetCustomGroup(customKeyName string) ([]string, error)

GetCustomGroup is responsible for extracting groups based on the provided custom claim key

func (*Claims) GetUserInfoGroups

func (c *Claims) GetUserInfoGroups(ctx context.Context, httpClient HTTPClient, accessToken, issuer, userInfoPath string) ([]string, error)

func (*Claims) UnmarshalJSON

func (c *Claims) UnmarshalJSON(data []byte) error

UnmarshalJSON is a custom Unmarshal that overwrites json.Unmarshal to mash every claim into a custom map

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

type UserInfo

type UserInfo struct {
	Groups []string `json:"groups"`
}

Jump to

Keyboard shortcuts

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