-
Hi, I would like to know the specific role of the property:
In the code tutorial hosted on baledung I don't find it, here is the bff application.yml but I'm pretty sure that some times ago there was, in my code there is and I was inspired by the tutorial. Maybe it's a concept related only to applications acting as resource-server ? I saw that if the value is $.preferred_username (with starting dollar) then I receive this error: while if the value is preferred_username then the flow is ok. Thanks as always for the explanation, bye |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
What I did lately in apps being both a client with
When building a security context for a request, we need to provide both. For OAuth2, Spring uses as default:
The
|
Beta Was this translation helpful? Give feedback.
$.preferred_username
is a JSON-path to a claim at the root of the JSON payload.preferred_username
is a String that JSON-path can bind to the same thing as$.preferred_username
.spring-addons-starter-oidc
uses JSON path to resolve the username in JSON payloads (JWT content or introspection response) butspring-security
doesn't. As a consequence:com.c4-soft.springaddons.oidc.ops[x].username-claim
can start with$.
(it has to if the target claim is a nested claim)spring.security.oauth2.client.provider.my-provider.user-name-attribute
must not start with$.
but can target only claims at the root of the payload (not nested ones)What I did lately in apps being both a client with
oauth2Login
…