Documentation
¶
Index ¶
- Variables
- func Encode(payload TokenPayload) string
- func LoadRSAPrivateKeyFromDisk(location string) *rsa.PrivateKey
- func LoadRSAPublicKeyFromDisk(location string) *rsa.PublicKey
- func ParseRSAPrivateKeyFromPEM(key []byte) (*rsa.PrivateKey, error)
- func ParseRSAPublicKeyFromPEM(key []byte) (*rsa.PublicKey, error)
- func Sign(data string, key *rsa.PrivateKey) (string, error)
- func Verify(data string, signature string, key *rsa.PublicKey) bool
- type JWT
- type TokenHeader
- type TokenPayload
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func Encode ¶
func Encode(payload TokenPayload) string
func LoadRSAPrivateKeyFromDisk ¶
func LoadRSAPrivateKeyFromDisk(location string) *rsa.PrivateKey
func ParseRSAPrivateKeyFromPEM ¶
func ParseRSAPrivateKeyFromPEM(key []byte) (*rsa.PrivateKey, error)
Types ¶
type JWT ¶
type JWT struct { Raw string Header TokenHeader Payload TokenPayload Signature string Valid bool }
type TokenHeader ¶
Click to show internal directories.
Click to hide internal directories.