Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateKeypair ¶
GenerateKeypair generates a public and private ECDSA key, for later user with NewIssuer or NewVerifier. These are written as binary files, because PEM is pointless.
Types ¶
type Issuer ¶
type Issuer struct {
Verifier
// LogTokenIssued is an optional user-provided function to log each
// token that is issued. If nil, no logging is performed. It
// should not panic; if it returns an error, the token is not
// return to the caller of Issue.
LogTokenIssued func(signedToken []byte, unsignedToken *pb.Token) error
// contains filtered or unexported fields
}
Issuer represents an issuer of tokens under a particular public key.
type Verifier ¶
type Verifier struct {
// contains filtered or unexported fields
}
Verifier represents an object that can verify tokens.
func NewVerifier ¶
NewVerify reads a verification key file, and returns a verifier to verify token objects.
Click to show internal directories.
Click to hide internal directories.