Documentation ¶
Index ¶
- Variables
- func CheckSignature(signedToken string, signingKey string) error
- func Decrypt(encryptedToken string, decryptionKey string) (string, error)
- func Encrypt(signedToken string, encryptionKey string) (string, error)
- func Pack(token Token, settings PackSettings) (string, error)
- func Serialize(token Token) (string, error)
- func Sign(encodedToken string, signingKey string) (string, error)
- type Header
- type PackSettings
- type Timestamp
- type Token
- type UnpackSettings
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrIncorrectSignature = errors.New("incorrect signature")
Functions ¶
func CheckSignature ¶
Types ¶
type PackSettings ¶
type Token ¶
type Token struct { Issuer string `json:"iss"` Subject string `json:"sub"` Audience string `json:"aud"` ExpirationTime Timestamp `json:"exp"` }
func Deserialize ¶
type UnpackSettings ¶
Click to show internal directories.
Click to hide internal directories.