You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Services often need to add their own claims to tokens to manage what users are allowed to do in a system. OIDC providers like Okta, Auth0, and others allow their users to add claims via configuration and integrations to support this. How can this be done with mockoidc? One can decode the access token to get the claims.
with the Claims() method adding the additional data to the jwt.Claims, but I still only get the original data - nothing in the way of the custom claims I added.
What am I missing?
The text was updated successfully, but these errors were encountered:
I created my own jsonClaims type that JSON encodes all the fields based on mockoidc'smockClaims type which adds the additional field which is what is used by my implementation of Claims().
PR #54 has some example code that exemplifies the behavior in a similar pattern to how I was doing it in my other code. The PR creates a custom user with a new attribute (PhoneVerified) and then adds a test to the session to get a token with the custom user type and checks for the attribute being in the claims as one would expect. The new test presently fails.
Services often need to add their own claims to tokens to manage what users are allowed to do in a system. OIDC providers like Okta, Auth0, and others allow their users to add claims via configuration and integrations to support this. How can this be done with
mockoidc
? One can decode the access token to get the claims.I tried building a custom user object:
with the
Claims()
method adding the additional data to thejwt.Claims
, but I still only get the original data - nothing in the way of the custom claims I added.What am I missing?
The text was updated successfully, but these errors were encountered: