domain

package
v0.0.0-...-cf695c7 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthenticationTokenRepository

type AuthenticationTokenRepository interface {
	Create(item AuthenticationTokens) error
	FindByToken(token string) (*AuthenticationTokens, error)
}

type AuthenticationTokens

type AuthenticationTokens struct {
	Token          string `dynamodbav:"Token"`
	CognitoSub     string `dynamodbav:"CognitoSub"`
	SubscribeNews  bool   `dynamodbav:"SubscribeNews"`
	ExpirationTime int64  `dynamodbav:"ExpirationTime"`
}

type AuthenticationTokensCreator

type AuthenticationTokensCreator struct {
	Token         string
	CognitoSub    string
	SubscribeNews bool
	Time          time.Time
}

func (*AuthenticationTokensCreator) Create

type CognitoAccessToken

type CognitoAccessToken struct {
	Sub      string `json:"sub"`
	Iss      string `json:"iss"`
	Scope    string `json:"scope"`
	ClientId string `json:"clientId"`
}

type CognitoIdToken

type CognitoIdToken struct {
	Sub           string `json:"sub"`
	Aud           string `json:"aud"`
	Iss           string `json:"iss"`
	Email         string `json:"email"`
	EmailVerified bool   `json:"emailVerified"`
}

type CognitoJwkRepository

type CognitoJwkRepository interface {
	Fetch() (jwk.Set, error)
}

type CognitoJwtTokenRepository

type CognitoJwtTokenRepository interface {
	ParseAndValidateIdToken(tokenStr string) (*CognitoIdToken, error)
	ParseAndValidateAccessToken(tokenStr string) (*CognitoAccessToken, error)
}

Jump to

Keyboard shortcuts

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