Esta conversación ha sido bloqueada debido a la inactividad. Cree una nueva publicación.
Nivel 1
Nivel 2
Iniciar sesión en la comunidad
Iniciar sesión para ver todas las insignias
Esta conversación ha sido bloqueada debido a la inactividad. Cree una nueva publicación.
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.
¡Resuelto! Ir a solución.
Los temas ayudan a categorizar el contenido de la comunidad e incrementan la posibilidad de encontrar contenido relevante.
Vistas
Respuestas
Total de me gusta
I've found the answer myself; I was using the incorrect private key.
Vistas
Respuestas
Total de me gusta
I've found the answer myself; I was using the incorrect private key.
Vistas
Respuestas
Total de me gusta
Vistas
Respuestas
Total de me gusta
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
Vistas
Respuestas
Total de me gusta
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);
Vistas
Respuestas
Total de me gusta
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.
Vistas
Respuestas
Total de me gusta
Vistas
Respuestas
Total de me gusta
Vistas
Respuestas
Total de me gusta
Hi JohnnyBrovo,
I am facing the same issue. Can you please help me.
Vistas
Respuestas
Total de me gusta
Hi @mukeshpatil please feel free to post a new forum question with the exact issue details and we can probably help you out.
Vistas
Respuestas
Total de me gusta
Vistas
me gusta
Respuestas
Vistas
me gusta
Respuestas
Vistas
me gusta
Respuestas
Vistas
me gusta
Respuestas
Vistas
me gusta
Respuestas