Get Other Claims From Token #81
-
I was able to create a token
Then I use a Consumer for verification.
But now I want to check a claim called "nonce". But I could not find a way to set it in the consumer. So then I tried to get it from the Token. 1st 2nd Last, I tried to get the entire JSON string. Do I have to create a descendant of TJWTClaims and add nonce as a property? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I found that I could create a custom claims class and add and access new claims there. But there does not seem to be a way to extend the Consumer class to add claims and validators. Is there a reason that the functions to do this are marked private? Thanks, John |
Beta Was this translation helpful? Give feedback.
-
Hello @jrunyan77 the validation of custom claims can be done through a consumer adding custom validators, I've extended the CustomClaims sample to show how. hope this will address the issue.. Paolo. |
Beta Was this translation helpful? Give feedback.
Hello @jrunyan77
the validation of custom claims can be done through a consumer adding custom validators, I've extended the CustomClaims sample to show how.
hope this will address the issue..
Paolo.