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);
}
Aggregations