java – Error 500 while using bearer token with Spring boot + Keycloak

This is my first Keycloack integration with a SpringBoot + Spring Security app, and i found myself in a problem. I am using the Keycloak Spring Security Adapter, but something is missing since an error 500 is shown instead of authorizing the request by bearer_token. When i don’t send the token, an authorization problem presents … Read more

jwt – JwtBearer middleware with ES256 always 401 Bearer error=”invalid_token”, error_description=”The signature key was not found”

token is created using public class AppTokenHandler : TokenValidator, IAppTokenHandler { private readonly JwtSecurityTokenHandler _handler = new JwtSecurityTokenHandler(); private readonly AppTokenConfiguration _appTokenConfiguration; private readonly RsaSecurityKey _publicKey; private readonly ECDsa _key; public AppTokenHandler(IOptions<AppTokenConfiguration> appTokenConfiguration, RsaSecurityKey publicKey, ECDsa key) { _appTokenConfiguration = appTokenConfiguration.Value; _publicKey = publicKey; _key = key; } public string Create(Dictionary<string, object> claims) { var … Read more