uport-project / kotlin-did-jwt

Create and verify uPort and DID compliant JWTs in Kotlin
https://developer.uport.me
Apache License 2.0
8 stars 6 forks source link

[Feature] allow issuer to be overridden by payload when creating JWTs #19

Closed mirceanis closed 5 years ago

mirceanis commented 5 years ago

what's here

Using this changeset the developer can override the issuer field of a JWT when calling createJWT by passing in a null or different issuer in the payload parameter.

This is not meant to be a publicly usable method of setting an issuer but it's required by the w3c verifiable credential compliance tests.

This doesn't change any existing API, but only brings more clarity to an existing edge-case.

testing

Tests were added to cover all the known paths an iss field can take, from parameter to encoded JWT, including previously uncovered edge cases.