Skip to content

Commit

Permalink
Merge pull request #45367 from michalvavrik/feature/make-identity-pro…
Browse files Browse the repository at this point in the history
…vider-man-creator-dependent

Make IdentityProviderManagerCreator a `@Dependent` bean as we don't need it once bean producer methods were used
  • Loading branch information
gastaldi authored Jan 4, 2025
2 parents 72dd7dc + dfa2b9c commit 9512889
Showing 1 changed file with 2 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.enterprise.inject.Instance;
import jakarta.enterprise.inject.Produces;
import jakarta.inject.Inject;

import io.quarkus.arc.DefaultBean;
import io.quarkus.runtime.ExecutorRecorder;
Expand All @@ -19,18 +18,8 @@
/**
* CDI bean than manages the lifecycle of the {@link io.quarkus.security.identity.IdentityProviderManager}
*/
@ApplicationScoped
public class IdentityProviderManagerCreator {

@Inject
Instance<IdentityProvider<?>> identityProviders;

@Inject
Instance<SecurityIdentityAugmentor> augmentors;

@Inject
BlockingSecurityExecutor blockingExecutor;

@ApplicationScoped
@DefaultBean
@Produces
Expand All @@ -45,7 +34,8 @@ public Executor get() {

@Produces
@ApplicationScoped
public IdentityProviderManager ipm() {
public IdentityProviderManager ipm(Instance<IdentityProvider<?>> identityProviders,
Instance<SecurityIdentityAugmentor> augmentors, BlockingSecurityExecutor blockingExecutor) {
boolean customAnon = false;
QuarkusIdentityProviderManagerImpl.Builder builder = QuarkusIdentityProviderManagerImpl.builder();
for (var i : identityProviders) {
Expand Down

0 comments on commit 9512889

Please sign in to comment.