org.acme.externalservice1.api.auth.CompositeAuthenticationProvider Maven / Gradle / Ivy
The newest version!
package org.acme.externalservice1.api.auth;
import jakarta.inject.Inject;
import jakarta.annotation.PostConstruct;
import jakarta.ws.rs.Priorities;
import jakarta.annotation.Priority;
import io.quarkiverse.openapi.generator.OpenApiGeneratorConfig;
import io.quarkiverse.openapi.generator.providers.BearerAuthenticationProvider;
import io.quarkiverse.openapi.generator.providers.AbstractCompositeAuthenticationProvider;
import io.quarkiverse.openapi.generator.providers.OperationAuthInfo;
import java.util.Optional;
@Priority(Priorities.AUTHENTICATION)
public class CompositeAuthenticationProvider extends AbstractCompositeAuthenticationProvider {
@jakarta.inject.Inject
OpenApiGeneratorConfig generatorConfig;
@PostConstruct
public void init() {
BearerAuthenticationProvider bearerProvider0 = new BearerAuthenticationProvider("token_propagation_external_service1_yaml", sanitizeAuthName("service1-http-bearer"), "bearer", generatorConfig);
this.addAuthenticationProvider(bearerProvider0);
bearerProvider0.addOperation(OperationAuthInfo.builder()
.withPath("/token-propagation-external-service1/executeQuery1")
.withId("executeQuery1")
.withMethod("POST")
.build());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy