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 new authenticator required action #16

Merged
merged 28 commits into from
Oct 22, 2024

Conversation

robson90
Copy link
Contributor

@robson90 robson90 commented Oct 2, 2024

Added Authenticator that sets a specific RequiredAction for the authenticating User

@robson90
Copy link
Contributor Author

robson90 commented Oct 7, 2024

@sventorben please take a look.

I added some documentation.

@@ -0,0 +1,19 @@
# Authenticator-Required-Action

Copy link
Member

Choose a reason for hiding this comment

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

I think you should add a general description of what problem or use case this authenticator is good for. Just starting with an example out of context does not really help to understand what it is doing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please check if that is sufficent.

authenticator-required-action/README.md Outdated Show resolved Hide resolved

@Override
public void authenticate(AuthenticationFlowContext context) {
context.getUser().addRequiredAction(
Copy link
Member

Choose a reason for hiding this comment

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

It would be good if we could make this more robust to configuration errors, e.g. what if no authenticator config exists, or what if the key is not present in the config, or the configured required action does not exist.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will look into it.

@robson90
Copy link
Contributor Author

@sventorben please take a look again.

@robson90 robson90 merged commit 1db5ec7 into main Oct 22, 2024
1 check passed
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