use of org.dcache.gplazma.oidc.helpers.JsonHttpClient in project dcache by dCache.
the class OidcAuthPlugin method buildProcessor.
private static TokenProcessor buildProcessor(Properties properties) {
Duration discoveryCacheDuration = asDuration(properties, DISCOVERY_CACHE_REFRESH);
JsonHttpClient client = buildClientFromProperties(properties);
Set<IdentityProvider> providers = new HashSet<>();
providers.addAll(buildHosts(properties, client.getClient(), discoveryCacheDuration));
providers.addAll(buildProviders(properties, client.getClient(), discoveryCacheDuration));
checkArgument(!providers.isEmpty(), "No OIDC providers configured");
var queryUserInfo = new QueryUserInfoEndpoint(properties, client, providers);
var offlineVerification = new OfflineJwtVerification(properties, client.getClient(), providers);
return ChainedTokenProcessor.tryWith(offlineVerification).andThenTryWith(queryUserInfo);
}
Aggregations