validator

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: MIT Imports: 11 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RetryPolicy = retry.Policy{
	MinDelay: 500 * time.Millisecond,
	MaxDelay: 3 * time.Second,
	MaxCount: 10,
}

RetryPolicy represents a policy for retrying http request to key URL.

Functions

func NewHTTPHandlerFunc added in v0.0.1

func NewHTTPHandlerFunc(timeout time.Duration) func(w http.ResponseWriter, r *http.Request)

NewHTTPHandlerFunc creates http handler func with timeout

Types

type Claims

type Claims map[string]interface{}

func Validate

func Validate(data string) (Claims, error)

Validate validates x-amzn-oidc-data as JWT

func ValidateWithContext

func ValidateWithContext(ctx context.Context, data string) (Claims, error)

ValidateWithContext validates x-amzn-oidc-data as JWT with context

func (Claims) Birthdate

func (c Claims) Birthdate() string

func (Claims) Email

func (c Claims) Email() string

func (Claims) EmailVerified

func (c Claims) EmailVerified() bool

func (Claims) FamilyName

func (c Claims) FamilyName() string

func (Claims) Gender

func (c Claims) Gender() string

func (Claims) GivenName

func (c Claims) GivenName() string

func (Claims) Locale

func (c Claims) Locale() string

func (Claims) MiddleName

func (c Claims) MiddleName() string

func (Claims) Name

func (c Claims) Name() string

func (Claims) Nickname

func (c Claims) Nickname() string

func (Claims) PhoneNumber

func (c Claims) PhoneNumber() string

func (Claims) PhoneNumberVerified

func (c Claims) PhoneNumberVerified() bool

func (Claims) Picture

func (c Claims) Picture() string

func (Claims) PreferredUsername

func (c Claims) PreferredUsername() string

func (Claims) Profile

func (c Claims) Profile() string

func (Claims) Sub

func (c Claims) Sub() string

func (Claims) UpdatedAt

func (c Claims) UpdatedAt() float64

func (*Claims) Valid

func (c *Claims) Valid() error

func (Claims) Website

func (c Claims) Website() string

func (Claims) Zoneinfo

func (c Claims) Zoneinfo() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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