Best posts made by bharath.yadavally
-
RE: Manually verifying a JWTposted in Q&A
@dan Discard my comment above regarding custom claims for JWT.
I found your post: https://fusionauth.io/community/forum/topic/65/how-does-one-add-custom-claims-to-the-jwt-issued-by-the-oauth-flow?_=1672715552700
Which should guide me through next steps. Thanks

Latest posts made by bharath.yadavally
-
RE: How to invalidate jwt issued before deativating user?posted in Q&A
@dan
Okay I can give it a go.But, trying to understand what is the difference in doing this webhook way vs doing following steps:
On every client request to backend service:
- Call
GET: api/jwt/validateor can implement manual validations (when no-claims scenario, only need to check signature and expiry) - Call
GET api/userwith valid jwt from step 1. Which returns a response withuser.active: falsefor deactivated user
- Call
-
RE: How to invalidate jwt issued before deativating user?posted in Q&A
@dan I am passing the access token to the
introspectendpoint, as you mentioned it is always returning active.What I actually trying to do is to have the
access tokenrevoked if the user account is deactivated.For my scenario, I am using
access tokenwith longer expiry but also wanted to revoke those token if a user is deactivated before that token is expired. -
How to invalidate jwt issued before deativating user?posted in Q&A
Can you be able to help me understand these flows:
I have two users
parent-userandchild-user-
child-userlogged in and received a valid token with lengthy expiry -
parent-userdeactivatedchild-userusing endpointDELETE: /api/userwhich successfully locked the user and showing locked in fusionauth UI -
But, when
child-userrequested data using token issued instep 1, validate endpointGET: api/jwt/validateendpoint is not invalidating the user. And returning success response back. When i checked user, applications are present in registrations.
Is this a bug? How can i invalidate a locked user properly??
EDIT:
I have looked into your post: https://fusionauth.io/community/forum/topic/49/how-should-i-validate-access-tokens
And, make sense /api/jwt/validate is just validating expiry, signature and claims. But, when I hit
/oauth2/introspectendpoint I am still getting user statusactive{ "active": true, "applicationId": "<appid-uuid>", "aud": "<appid-uuid>", "auth_time": 1673234995, "authenticationType": "PASSWORD", "email": "myuser@mailinator.com", "email_verified": true, "exp": 1674444595, "iat": 1673234995, "iss": "auth-dev.mailinator.com", "jti": "jti-uuid", "roles": [], "scope": "offline_access", "sub": "<user-uuid>", "tid": "<t-uuid>" } -
-
RE: Manually verifying a JWTposted in Q&A
@dan Discard my comment above regarding custom claims for JWT.
I found your post: https://fusionauth.io/community/forum/topic/65/how-does-one-add-custom-claims-to-the-jwt-issued-by-the-oauth-flow?_=1672715552700
Which should guide me through next steps. Thanks

-
RE: Manually verifying a JWTposted in Q&A
@dan Now I am able to validate the token using RS256.
But, trying to figure out how can I add a user statusACTIVEorINACTIVEto jwt token when generated first time by fusionauth.I previously used auth0 where we can add a js script like lambda functions to add custom parameters to jwt. Is something I could do with fusionauth?
-
RE: Manually verifying a JWTposted in Q&A
@dan I forgot how I created my key at first place, imported a new one and using private key which I generated.