Skip to content

fix: openid_frontend: support extra_id_token_claims in stateless mode - #506

Merged
c00kiemon5ter merged 1 commit into
IdentityPython:masterfrom
REANNZ:fix-stateless-extra-id-token-claims
Sep 30, 2026
Merged

c00kiemon5ter merged 1 commit into
IdentityPython:masterfrom
REANNZ:fix-stateless-extra-id-token-claims

Conversation

@vladimir-mencl-eresearch

Copy link
Copy Markdown
Contributor

The lambda function passed to pyop handle_token_request as extra_id_token_claims does not support stateless mode, it relies on user attributes available in the database.

As pyop handle_token_request already supports getting extra_id_token_claims with authz_state.get_extra_id_token_claims_for_code, just pass {} (not the lambda function) and let pyop get the claims this way.

All Submissions:

  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Have you added an explanation of what problem you are trying to solve with this PR?
  • Have you added information on what your changes do and why you chose this as your solution?
  • [N] Have you written new tests for your changes?
  • [N] Does your submission pass tests?
  • [N] This project follows PEP8 style guide. Have you run your code against the 'flake8' linter?

The lambda function passed to pyop `handle_token_request` as `extra_id_token_claims` does not support stateless mode, it relies on user attributes available in the database.

As pyop `handle_token_request` already supports getting `extra_id_token_claims` with `authz_state.get_extra_id_token_claims_for_code`, just pass `{}` (not the lambda function) and let pyop get the claims this way.
@vladimir-mencl-eresearch

Copy link
Copy Markdown
Contributor Author

Hi @c00kiemon5ter ,

Thanks for the new work on cutting releases of pyop and SATOSA.

That has prompted me to try if I can use extra_id_token_claims in stateless mode now ... and while I was getting a KeyError in pyop/userinfo.py line 34, I found an easy fix.

Please let me know if OK to merge.

Cheers,
Vlad

@c00kiemon5ter
c00kiemon5ter merged commit 2c057ae into IdentityPython:master Sep 30, 2026
@c00kiemon5ter

Copy link
Copy Markdown
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants