The previous way to handle unregistered claims was to use these methods:
Which have both been deprecated, stating to "use a sub-type", which I assume means to define an instance of HasClaimsSet for some type I define;
However, there doesn't appear to be any way to actually provide unregistered claims for a custom type, since there's no lens for unregistered claims in HasClaimsSet to implement in the instance, and there's no way to create a ClaimsSet record otherwise since the _unregisteredClaims field of ClaimsSet isn't exported.
I suppose I could use the FromJSON instance of ClaimsSet to implement HasClaimsSet without using any deprecated methods, but that definitely seems like taking the long-way around and would involve introducing a possible failure point in the decoding step.
Perhaps was an claimUnregistered :: Lens' a (Map Text Value) accidentally omitted from HasClaimsSet when the other methods were deprecated?
Thanks!
The previous way to handle unregistered claims was to use these methods:
Which have both been deprecated, stating to "use a sub-type", which I assume means to define an instance of
HasClaimsSetfor some type I define;However, there doesn't appear to be any way to actually provide unregistered claims for a custom type, since there's no lens for unregistered claims in
HasClaimsSetto implement in the instance, and there's no way to create aClaimsSetrecord otherwise since the_unregisteredClaimsfield ofClaimsSetisn't exported.I suppose I could use the
FromJSONinstance ofClaimsSetto implementHasClaimsSetwithout using any deprecated methods, but that definitely seems like taking the long-way around and would involve introducing a possible failure point in the decoding step.Perhaps was an
claimUnregistered :: Lens' a (Map Text Value)accidentally omitted fromHasClaimsSetwhen the other methods were deprecated?Thanks!