Merge pull request #867 from mposolda/master

KEYCLOAK-858 avoid creating inner DeploymentDelegate for each request
This commit is contained in:
Marek Posolda 2014-11-21 23:50:20 +01:00
commit 21eb40e2c2
2 changed files with 6 additions and 4 deletions

View file

@ -78,9 +78,11 @@ public class AdapterDeploymentContext {
if (deployment == null) return null; if (deployment == null) return null;
if (deployment.getAuthServerBaseUrl() == null) return deployment; if (deployment.getAuthServerBaseUrl() == null) return deployment;
deployment = resolveUrls(deployment, facade); KeycloakDeployment resolvedDeployment = resolveUrls(deployment, facade);
if (deployment.getRealmKey() == null) resolveRealmKey(deployment); if (resolvedDeployment.getRealmKey() == null) {
return deployment; resolveRealmKey(resolvedDeployment);
}
return resolvedDeployment;
} }
protected KeycloakDeployment resolveUrls(KeycloakDeployment deployment, HttpFacade facade) { protected KeycloakDeployment resolveUrls(KeycloakDeployment deployment, HttpFacade facade) {

View file

@ -24,7 +24,7 @@ public class KeycloakDeployment {
protected RelativeUrlsUsed relativeUrls; protected RelativeUrlsUsed relativeUrls;
protected String realm; protected String realm;
protected PublicKey realmKey; protected volatile PublicKey realmKey;
protected String authServerBaseUrl; protected String authServerBaseUrl;
protected String realmInfoUrl; protected String realmInfoUrl;
protected KeycloakUriBuilder authUrl; protected KeycloakUriBuilder authUrl;