All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.quarkus.oidc.runtime.AbstractOidcAuthenticationMechanism Maven / Gradle / Ivy

Go to download

Secure your applications with OpenID Connect Adapter and IDP such as Keycloak

There is a newer version: 3.18.0.CR1
Show newest version
package io.quarkus.oidc.runtime;

import java.util.concurrent.CompletionStage;

import javax.inject.Inject;

import io.quarkus.security.credential.TokenCredential;
import io.quarkus.security.identity.IdentityProviderManager;
import io.quarkus.security.identity.SecurityIdentity;
import io.quarkus.security.identity.request.TokenAuthenticationRequest;
import io.quarkus.vertx.http.runtime.security.HttpAuthenticationMechanism;

abstract class AbstractOidcAuthenticationMechanism implements HttpAuthenticationMechanism {

    protected static final String BEARER = "Bearer";

    @Inject
    DefaultTenantConfigResolver tenantConfigResolver;

    protected CompletionStage authenticate(IdentityProviderManager identityProviderManager,
            TokenCredential token) {
        return identityProviderManager.authenticate(new TokenAuthenticationRequest(token));
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy