Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 3641

Angular - Spring API - Azure Entra ID invalid Signature

$
0
0

I'm getting trouble to setup Microsoft Entra ID configuration.I have an Angular application which is configured like this documentation:https://learn.microsoft.com/en-us/entra/identity-platform/tutorial-single-page-apps-angular-prepare-app

I'm able to connect to my application with the microsoft login.However I need to call spring boot rest APIs with a valid jwt token.

So I added my http://localhost:8080 to my protected resources map of the interceptor with the scope "user.read" as follow:

public static MSALInterceptorConfigFactory(): MsalInterceptorConfiguration {  const protectedResourceMap = new Map<string, Array<string | ProtectedResourceScopes> | null>();  protectedResourceMap.set('http://localhost:8080', ['user.read']);  return {    interactionType: InteractionType.Redirect,    protectedResourceMap,  };}

When calling the API the JWT is now well.But the Spring Boot application throw the following error:Caused by: com.nimbusds.jose.proc.BadJWSException: Signed JWT rejected: Invalid signature

And when I decode my JWT on https://jwt.io/ it also says the the signature is invalid.

What am I missing ?


Viewing all articles
Browse latest Browse all 3641

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>