Documentation ¶
Overview ¶
Package pasetoclaims provides claim declaration for token generation and verification
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomClaims ¶
type CustomClaims struct { WalletAddress string `json:"walletAddress"` SignedBy string `json:"signedBy"` pvx.RegisteredClaims }
CustomClaims defines claims for paseto containing wallet address, signed by and RegisteredClaims
func New ¶
func New(walletAddress string, expiration time.Duration, signedBy string) CustomClaims
New returns CustomClaims with wallet address, signed by and expiration
func (CustomClaims) Valid ¶
func (c CustomClaims) Valid() error
Valid checks if the claims are valid agaist RegisteredClaims and checks if wallet address exist in database
Click to show internal directories.
Click to hide internal directories.