util

package
v0.0.0-20240909165019 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAggregate

func NewAggregate(errs []error) error

NewAggregate 创建一个聚合错误

Types

type AggregateError

type AggregateError []error

AggregateError 聚合多个错误

func (AggregateError) Error

func (agg AggregateError) Error() string

Error 实现 error 接口

type ClaimExtractor

type ClaimExtractor interface {
	// GetClaim fetches a named claim and returns the value.
	GetClaim(claim string) (interface{}, bool, error)

	// GetClaimInto fetches a named claim and puts the value into the destination.
	GetClaimInto(claim string, dst interface{}) (bool, error)
}

ClaimExtractor is used to extract claim values from an ID Token, or, if not present, from the profile URL.

func NewClaimExtractor

func NewClaimExtractor(idToken string, profileURL *url.URL, profileRequestHeaders http.Header) (ClaimExtractor, error)

NewClaimExtractor constructs a new ClaimExtractor from the raw ID Token. If needed, it will use the profile URL to look up a claim if it isn't present within the ID Token.

Jump to

Keyboard shortcuts

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