PocketID: Access to claims does not work #141
-
First, thank you for your great project! My middleware: http:
middlewares:
oidc-test:
plugin:
traefik-oidc-auth:
LogLevel: DEBUG
Secret: SC9JQatvDUC4j5y9mvI9y0LJ0jx9yduH
Provider:
Url: https://idp.example.com
ClientId: 881af94c-b643-4a4e-a5ed-3c6d3f9316f2
ClientSecret: Shjc2VwkMPUwvlSAhqdolyCZwb3x52Sh
# UsePkce: true
TokenValidation: "IdToken"
Scopes: ["openid", "profile", "email", "groups"]
Headers:
- Name: X-Access-Token
Value: "{{`{{ .accessToken }}`}}"
- Name: X-Id-Token
Value: "{{`{{ .idToken }}`}}"
- Name: X-Refresh-Token
Value: "{{`{{ .refreshToken }}`}}"
- Name: Remote-User
Value: "{{`{{ .claims.preferred_username }}`}}"
- Name: Remote-Name
Value: "{{`{{ .claims.name }}`}}"
- Name: Remote-Email
Value: "{{`{{ .claims.email }}`}}"
- Name: X-Claims
Value: "{{`{{ .claims }}`}}" The incoming request at the target service looks like this:
Though I'm requesting the profile-scope and set TokenValidation to "IdToken" according to the docs but the claims do not include any profile information (see the X-Claims Header). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
Hi @meerumschlungen, Headers:
- Name: X-Access-Token
Value: "{{`{{ .accessToken }}`}}"
- Name: X-Id-Token
Value: "{{`{{ .idToken }}`}}" you can then copy the JWT token you received and paste it into https://jwt.io to see which claims it contains. |
Beta Was this translation helpful? Give feedback.
It cost me about a day of debugging and in the end I figured out. It was a nesting problem of the TokenValidation property which is part of the Provider object:
Not working:
Working: