The State Backed key id and secret to use for signing.
You can generate one by running smply keys create.
Check the Getting Started guide at https://docs.statebacked.dev/
for more information.
The end-user claims to include in the JWT.
Should include a sub claim with the end-user's id.
Optional sub?: stringOptions for signing the JWT.
Set issuer to your domain and provide either
expires.at or expires.in to set the expiration time.
expires.in should be a string like "7d" or "30m".
expires.at can be a Date or seconds since epoch.
expires.at is used if both are provided.
A Promise for a signed JWT.
Generated using TypeDoc
Given a State Backed key id and secret, end-user claims, and signing options, return a Promise for a signed JWT suitable for sending in the authorization header of requests to State Backed.
The end-user claims should include a
subclaim with the end-user's unique id and may include any other data that your machines'allowReadandallowWriteauthorization functions need.It is best practice to set the issuer in your signing options to your domain and set either
expires.atorexpires.into a reasonable value, matching your session duration.