Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateKeyForTokens ¶
CreateKeyForTokens creates an elliptic curve (EC) key that can be used for signing tokens. The token functions in this library will accept any valid key, EC or not, and do not require that the key be created by this function.
func CreateTokenFromKey ¶
CreateTokenFromKey creates a new JSON Web Token (JWT) and signs it with the given key. The key should be a decoded PEM key, in DER form, such as the one produced by the CreateKeyForToken() function below.
func GetKeyFromPEM ¶
GetKeyFromPEM will read the key from a PEM block.
func VerifyToken ¶
VerifyToken verifies that a given JWT was signed with the specified key.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.