Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support more claims in password grant #3864

Merged
merged 11 commits into from
Oct 31, 2024
Merged

Conversation

hperl
Copy link
Contributor

@hperl hperl commented Oct 28, 2024

For the resource owner password grant, the Kratos identity ID is now written to the sub claim, and the username is written to the ext.username claim. Further, token hooks are called for the initial token issuance as well as refresh flows for access tokens issued via the resource owner password grant, allowing users to customize the fields present in the access token (for the jwt strategy) as well as on introspection.

Related issue(s)

Related fosite PR: ory/fosite#831
Related: https://github.com/ory-corp/cloud/issues/6955

Checklist

  • I have read the contributing guidelines.
  • I have referenced an issue containing the design document if my change
    introduces a new feature.
  • I am following the
    contributing code guidelines.
  • I have read the security policy.
  • I confirm that this pull request does not address a security
    vulnerability. If this pull request addresses a security vulnerability, I
    confirm that I got the approval (please contact
    security@ory.sh) from the maintainers to push
    the changes.
  • I have added tests that prove my fix is effective or that my feature
    works.
  • I have added or changed the documentation.

Further Comments

@hperl hperl requested review from aeneasr and alnr as code owners October 28, 2024 13:29
@hperl hperl self-assigned this Oct 28, 2024
oauth2/handler.go Outdated Show resolved Hide resolved
@hperl hperl force-pushed the hperl/rop-grant-add-claims branch from 7dde989 to 39e1c61 Compare October 29, 2024 10:14
go.mod Outdated Show resolved Hide resolved
oauth2/oauth2_rop_test.go Outdated Show resolved Hide resolved
@hperl hperl requested review from jonas-jonas and alnr October 29, 2024 10:25
persistence/sql/persister_authenticate.go Outdated Show resolved Hide resolved
Copy link
Contributor

@alnr alnr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

beautiful

@hperl hperl merged commit 41476ec into master Oct 31, 2024
29 checks passed
@hperl hperl deleted the hperl/rop-grant-add-claims branch October 31, 2024 08:40
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.

3 participants