I have an app that uses the Privacy API to anonymise user details upon request. The app generates a JWT and sends it to https://ims-na1.adobelogin.com/ims/exchange/jwt to retrieve an access token to use for the Privacy API request. However, following the recent changes to the Adobe I/O console, my app has stopped working. In an effort to get it working again, I have created a new project in the console to use for it. Now when trying to get an access token, I am getting a 400 bad request error with the detail of "Could not match JWT signature to any of the bindings". Can anyone please tell me exactly what causes this specific error? I can't find it mentioned in the documentation.
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
I've found the answer myself; I was using the incorrect private key.
I've found the answer myself; I was using the incorrect private key.
Views
Replies
Total Likes
Hi BenCrowe, I'm trying to create an app to do the same thing; generate a JWT to get an access token. Could you do me a massive favor and share your code with me? I'm struggling to get my app to work. Much appreciated if possible! Thank you
Views
Replies
Total Likes
Hi BenCrowe, thank you very much for the reply. I'm using C# / console app, and I keep getting the same error you got "Could not match JWT signature to any of the bindings" when I try to get the access token after generating the JWT per the below and posting. I'm certain I have the right key. Below is what I have. Thanks again for any tips, much appreciated!
using Microsoft.IdentityModel.Tokens;
using RestSharp;
using System;
using System.IdentityModel.Tokens.Jwt;
using System.Linq;
using System.Text
string key = System.IO.File.ReadAllText(@"C:\[directory....]\private.key");
var securityKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(key));
var credentials = new SigningCredentials
(securityKey, SecurityAlgorithms.HmacSha256Signature);
var header = new JwtHeader(credentials);
var payload = new JwtPayload
{ // payload stuff - double checked - values correct
{"exp",'....''},
{ "iss",",,,,,,"},
{"sub","......."},
{"https://.........",true},
{"aud","......."}
};
var secToken = new JwtSecurityToken(header, payload);
var handler = new JwtSecurityTokenHandler();
var tokenString = handler.WriteToken(secToken);
Console.WriteLine(tokenString);
Console.WriteLine("Consume Token");
var token = handler.ReadJwtToken(tokenString);
Console.WriteLine(token.Payload.First().Value);
Views
Replies
Total Likes
Hi JohnnyBravo, I'm afraid I don't know C#. The code I wrote is in PHP for a Linux-based server. All I can suggest is outputting the key data you are reading in somewhere, a debug log or something, to make sure you are reading it correctly. I would also maybe avoid applying the UTF8 coding to the key to see if that helps, it may be changing the value somehow.
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Hi JohnnyBrovo,
I am facing the same issue. Can you please help me.
Views
Replies
Total Likes
Hi @mukeshpatil please feel free to post a new forum question with the exact issue details and we can probably help you out.
Views
Replies
Total Likes
Views
Likes
Replies