claims

package
v1.9.0-industry.4 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 8 more Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Audience

type Audience []string

Audience represents the audiences.

func (Audience) Contains

func (a Audience) Contains(aud string) bool

Contains detects whether the specified element is included in the array.

func (Audience) MarshalJSON

func (a Audience) MarshalJSON() ([]byte, error)

MarshalJSON implemented by types that can marshal themselves into valid JSON.

func (*Audience) UnmarshalJSON

func (a *Audience) UnmarshalJSON(b []byte) error

UnmarshalJSON implemented by types that can unmarshal a JSON description of themselves.

type FederatedIDClaims

type FederatedIDClaims struct {
	// 租户ID
	ConnectorID string `json:"connector_id,omitempty"`
	// 用户ID
	UserID string `json:"user_id,omitempty"`
}

FederatedIDClaims represents the extension struct of claims.

type IDTokenClaims

type IDTokenClaims struct {
	Issuer           string   `json:"iss"`
	Subject          string   `json:"sub"`
	Audience         Audience `json:"aud"`
	Expiry           int64    `json:"exp"`
	IssuedAt         int64    `json:"iat"`
	AuthorizingParty string   `json:"azp,omitempty"`
	Nonce            string   `json:"nonce,omitempty"`
	AccessTokenHash  string   `json:"at_hash,omitempty"`

	Groups            []string           `json:"groups,omitempty"`
	Name              string             `json:"name,omitempty"`
	FederatedIDClaims *FederatedIDClaims `json:"federated_claims,omitempty"`
}

IDTokenClaims is an OpenID Connect extension that provides a predictable representation of an authorization event.

Jump to

Keyboard shortcuts

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