Problem/Motivation
When encoding the JWT, custom JWT headers (like crit) could be set. However the \Drupal\jwt\JsonWebToken\JsonWebTokenInterface does not have a way to set any additional headers.
Proposed resolution
Add option to provide headers and key ID as accepted by Firebase\JWT\JWT::encode
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 3256486-8.patch | 8.97 KB | pwolanin |
| #7 | 3256486-7.patch | 8.73 KB | pwolanin |
| #6 | 3256486-6.patch | 6.47 KB | pwolanin |
| #5 | 3256486-5.patch | 3.57 KB | pwolanin |
Comments
Comment #2
pwolanin commentedComment #3
pwolanin commentedComment #4
pwolanin commentedComment #5
pwolanin commentedNeed to add tests
Comment #6
pwolanin commentedComment #7
pwolanin commentedsome more fixes
Comment #8
pwolanin commenteda couple more test asserts regarding special headers alg and typ
Comment #9
pwolanin commentedComment #11
vijaycs85Thanks @pwolanin. tested and confirmed it is working with custom headers.