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

Add scope to client credentials token #12306

Merged

Conversation

vahpetr
Copy link
Contributor

@vahpetr vahpetr commented Sep 1, 2022

Added scope field to token. The field is required for validation access policy on the server side

@vahpetr
Copy link
Contributor Author

vahpetr commented Sep 12, 2022

up

@@ -479,6 +479,7 @@ private async Task<IActionResult> ExchangeClientCredentialsGrantType(OpenIddictR
}

var principal = new ClaimsPrincipal(identity);
principal.SetScopes(request.GetScopes());
Copy link
Member

Choose a reason for hiding this comment

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

@kevinchalet LGTM but can you confirm, thanks.

@kevinchalet kevinchalet self-assigned this Sep 13, 2022
@kevinchalet kevinchalet added this to the 1.x milestone Sep 13, 2022
Copy link
Member

@kevinchalet kevinchalet left a comment

Choose a reason for hiding this comment

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

Thanks for your PR, @vahpetr!

@kevinchalet kevinchalet merged commit 52a59eb into OrchardCMS:main Sep 13, 2022
@kevinchalet
Copy link
Member

PR merged, thanks again for your contribution 👏🏻

@Skrypt Skrypt modified the milestones: 1.x, 1.5 Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants