Search in sources :

Example 1 with JwtPkceVerifyingRealm

use of com.bakdata.conquery.models.auth.oidc.JwtPkceVerifyingRealm in project conquery by bakdata.

the class JwtPkceVerifyingRealmFactory method createRealm.

public ConqueryAuthenticationRealm createRealm(ManagerNode manager) {
    List<TokenVerifier.Predicate<AccessToken>> additionalVerifiers = new ArrayList<>();
    for (String additionalTokenCheck : additionalTokenChecks) {
        additionalVerifiers.add(ScriptedTokenChecker.create(additionalTokenCheck));
    }
    idpConfigurationSupplier = getIdpOptionsSupplier(manager.getClient());
    authCookieCreator = manager.getConfig().getAuthentication()::createAuthCookie;
    // Add login schema for admin end
    final RedirectingAuthFilter redirectingAuthFilter = manager.getAuthController().getRedirectingAuthFilter();
    redirectingAuthFilter.getAuthAttemptCheckers().add(this::checkAndRedeemAuthzCode);
    redirectingAuthFilter.getAuthAttemptCheckers().add(this::checkAndRedeemRefreshToken);
    redirectingAuthFilter.getLoginInitiators().add(this::initiateLogin);
    return new JwtPkceVerifyingRealm(idpConfigurationSupplier, client, additionalVerifiers, alternativeIdClaims, manager.getStorage(), tokenLeeway);
}
Also used : JwtPkceVerifyingRealm(com.bakdata.conquery.models.auth.oidc.JwtPkceVerifyingRealm) RedirectingAuthFilter(com.bakdata.conquery.models.auth.web.RedirectingAuthFilter)

Aggregations

JwtPkceVerifyingRealm (com.bakdata.conquery.models.auth.oidc.JwtPkceVerifyingRealm)1 RedirectingAuthFilter (com.bakdata.conquery.models.auth.web.RedirectingAuthFilter)1