Encodes the Unsecured JWT.
()
| 65 | |
| 66 | /** Encodes the Unsecured JWT. */ |
| 67 | encode(): string { |
| 68 | const header = b64u.encode(JSON.stringify({ alg: 'none' })) |
| 69 | const payload = b64u.encode(this.#jwt.data()) |
| 70 | |
| 71 | return `${header}.${payload}.` |
| 72 | } |
| 73 | |
| 74 | setIssuer(issuer: string): this { |
| 75 | this.#jwt.iss = issuer |