awstoken

package
v0.0.0-...-21df278 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSToken

type AWSToken struct {
	// contains filtered or unexported fields
}

func New

func New(env, region string) *AWSToken

func (*AWSToken) ExchangeCredentials

func (t *AWSToken) ExchangeCredentials(ctx context.Context, org *am.Organization, idKey, accessKey string) (string, error)

func (*AWSToken) UnsafeExtractAccess

func (t *AWSToken) UnsafeExtractAccess(ctx context.Context, accessKey string) (*token.AccessToken, error)

func (*AWSToken) UnsafeExtractID

func (t *AWSToken) UnsafeExtractID(ctx context.Context, idKey string) (*token.IDToken, error)

func (*AWSToken) ValidateAccessToken

func (t *AWSToken) ValidateAccessToken(ctx context.Context, org *am.Organization, accessKey string) (*token.AccessToken, error)

ValidateAccessToken verifies the signature from the user pool is valid (not expired, properly signed) then verifies individual claims inside the parsed token.

func (*AWSToken) ValidateIDToken

func (t *AWSToken) ValidateIDToken(ctx context.Context, org *am.Organization, idKey string) (*token.IDToken, error)

ValidateIDToken verifies the signature from the user pool is valid (not expired, properly signed) then verifies individual claims inside the parsed token.

type JWK

type JWK struct {
	Keys []JWKKey
}

JWK is json data struct for JSON Web Key

type JWKKey

type JWKKey struct {
	Alg string
	E   string
	Kid string
	Kty string
	N   string
	Use string
}

JWKKey is json data struct for cognito jwk key

Jump to

Keyboard shortcuts

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