types

package
Version: v3.2.4 Latest Latest
Warning

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

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

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:"email_verified,omitempty"`
	ServiceAccountName string                 `json:"service_account_name,omitempty"`
	RawClaim           map[string]interface{} `json:"-"`
}

func (*Claims) GetCustomGroup added in v3.2.0

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

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

func (*Claims) GetUserInfoGroups added in v3.2.0

func (c *Claims) GetUserInfoGroups(accessToken, issuer, userInfoPath string) ([]string, error)

func (*Claims) UnmarshalJSON added in v3.2.0

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 added in v3.2.0

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

type UserInfo added in v3.2.0

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

Source Files

Jump to

Keyboard shortcuts

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