| 1 | import time |
| 2 | |
| 3 | pub struct Payload { |
| 4 | iss ?string // issuer; usually the domain name of the application issuing the token |
| 5 | sub ?string // subject; usually the id of the user the token represents |
| 6 | aud ?string // audience; usually the domain name of the application that will receive the token |
| 7 | exp ?time.Time // expiration time; unix timestamp |
| 8 | iat ?time.Time // not before; unix timestamp |
| 9 | ext ?string // extra data |
| 10 | } |
| 11 | |
| 12 | _ := Payload{ |
| 13 | sub: '1234567890' |
| 14 | exp: time.parse('2019-01-01 00:00:00') |
| 15 | } |
| 16 | |