Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generator ¶
type Generator struct { ApplicationID string PrivateKey []byte TTL time.Duration Subject string Paths []Path JTI uuid.UUID NBF int64 // contains filtered or unexported fields }
Generator is what makes a token. Set the fields you need, then generate. The token is also stored in `token` once generated.
func NewGenerator ¶
NewGenerator takes your application ID and private key to create a generator
func NewGeneratorFromFilename ¶
NewGeneratorFromFilename takes your application ID and the filename of your private key to create a token generator
func (*Generator) GenerateToken ¶
GenerateToken assembles and returns the JWT token
Click to show internal directories.
Click to hide internal directories.