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
Make Authorizer
pluggable
#8090
Conversation
} | ||
|
||
public void eagerAuthorizerInitialization( | ||
@Observes StartupEvent event, @SuppressWarnings("unused") Authorizer authorizer) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: do we actually need the Authorizer
parameter? This being an instance method requires QuarkusAuthorizer
to be created anyway, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's exactly the intent here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It shall initialize it to run into possible config issues early
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That initialization will happen in the QuarkusAuthorizer
constructor anyway. The Authorizer
reference here will probably cause a CDI resolution error if there are more than one instance available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the class be annotated with @Startup
instead?
https://quarkus.io/version/main/guides/lifecycle#startup_annotation
servers/quarkus-auth/src/main/java/org/projectnessie/server/authz/QuarkusAuthorizer.java
Outdated
Show resolved
Hide resolved
2febac8
to
3b73758
Compare
3b73758
to
24cd144
Compare
No description provided.