OAuth Inbound JWT Bearer integration, Invalid JWT Signature - invalid_grant oauth_token.do response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours ago
Hi,
I am writing an integration code, which will allow external website users automatically login to ServiceNow,
I've encountered an issue with JWT Bearer inbound Oauth integration flow, specifically with exchanging the generated jwt token, signed with private signature key for the user access token. Any suggest in regards of targeting the invalid parameter, or could be that i am using wrong encryption algorithm for the JWT token signature.
request "grant_type" is set to "urn:ietf:params:oauth:grant-type:jwt-bearer"
provided payload parameters inside the assertion token:
"aud", "kid", "iss", "exp", "iat", "sub", "jti", "nbf"
assertion token signed with RsaSecurityKey, using RsaSha256 encryption algorithm.
Does the pre generated JWT Key in ServiceNow needs to be signed with the same algorithm type or can other algorithm type can be used ? Any tips how to diagnose this issue ?
response:
"[""error_description"": ""Invalid JWT Signature"", ""error"": ""invalid_grant""]"