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

Allow modifying scopes in AuthorizationRequestResolveEvent #155

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Amunak
Copy link
Contributor

@Amunak Amunak commented Aug 7, 2023

Sometimes there's a need to allow the user to select optional scopes to allow or exclude from any given AuthorizationRequest.

We already have a good event to hook into to let the user decide whether they want to permit an OAuth connection or not, but there is no option in this (or later) event to modify the scopes.

This PR attempts to address that.

@chalasr
Copy link
Member

chalasr commented Aug 7, 2023

Looks sensible to me, thanks for the PR. Could you add some test?

@Amunak
Copy link
Contributor Author

Amunak commented Aug 8, 2023

Could you add some test?

I'm not really sure how or what to test - it appeared to me that events aren't tested at all, so there's no good place to add this without also testing the events.

Obviously I could add a unit test for the setter but that doesn't really help much. For what it's worth I actually tested this solution and it worked so unless I botched copying it it should be fine.

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