Use ioctl to issue a JWT
Every account ioctl created contains a pair of 256-bit private/public key. We can use it to sign and issue JWT:
Read More about JWT Tokens
Read More about JWT Tokens
What is JWT
JWT (JSON Web Token) is a very popular technology widely used in web API and user authentication. It contains certain access control claims, such as what data/resource can be access, the access expire time, and access rights (read, write, or delete).The token is base64-encoded and digitally signed using a secret (with the HMAC algorithm) or a private key. By verifying the signature it can be guaranteed that the claims must come from the holder of the signing key.In a nutshell, JWT consists of three parts separated by dot . , which are- Header
- Payload
- Signature
Example
Here is an example of a JWT encoded token:"exp"is the token’s expiration time"iat"is the token’s issue time (you can convert date/time here)"iss"is the public key of issuer"sub"is the subject, here it refers to a resource/data named weather"scope"is the access control rights granted for the resource, here it allows to create
iss above.
