Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateKeypair ¶
GenerateKeypair generates a public and private ECDSA key, to be used for signing and verifying authentication tokens.
Types ¶
type Signer ¶
type Signer interface { // Sign a token and return the serialized cryptographic token. Sign(token *AuthToken) (string, error) }
Signer signs an issued token
type Verifier ¶
type Verifier interface { // Verify the payload and return the Token if the payload is valid. Verify(s string) (token *AuthToken, err error) }
Verifier verifies the serialized representation of a token
func NewVerifier ¶
NewVerifier reads a verification key file, and returns a verifier to verify token objects.
Click to show internal directories.
Click to hide internal directories.