Documentation ¶
Index ¶
- func BuildRSAJWTToken(payload []byte, expireAt time.Time, keyID string) (token string, err error)
- func GetPublicKey(keyID string) ([]byte, bool, error)
- func ParseRSAJWTToken(token string, keyID string) (payload []byte, err error)
- func StorePrivateKey(keyID string, privateKeyPEM string) (err error)
- func StorePublicKey(keyID string, publicKeyPEM string) (err error)
- type Provider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildRSAJWTToken ¶
usualy payload is the serialized protobuf message
func ParseRSAJWTToken ¶
func StorePrivateKey ¶
func StorePublicKey ¶
Types ¶
type Provider ¶
type Provider interface { BuildRSAJWTToken(payload []byte, expireAt time.Time, rsaKeyID string) (token string, err error) ParseRSAJWTToken(token string, keyID string) (payload []byte, err error) StorePrivateKey(keyID string, privateKeyPEM string) (err error) StorePublicKey(keyID string, publicKeyPEM string) (err error) GetPublicKey(keyID string) (key []byte, found bool, err error) }
Provider to build & sign JWT token using RSA signing method with (with symetric key) It is used for simple email validation
Click to show internal directories.
Click to hide internal directories.