Documentation ¶
Index ¶
Constants ¶
View Source
const (
InvalidTokenErr = "invalid token"
)
Constant error messages
Variables ¶
This section is empty.
Functions ¶
func GetAPIPrivateKey ¶
GetAPIPrivateKey returns the private RSA key to authenticate HTTP requests sent to the daemon.
func GetAPIPublicKey ¶
GetAPIPublicKey returns public RSA key
Types ¶
type Claims ¶
type Claims struct { Email string `json:"email"` jwt.StandardClaims }
Claims (payload) of JWT token
func ValidateToken ¶
ValidateToken ensures token is valid and returns its metadata
func (*Claims) GenerateToken ¶
GenerateToken creates a JWT token using signKey (ie private rsa key)
Click to show internal directories.
Click to hide internal directories.