diff --git a/src/main/java/pl/cyfronet/indigo/security/ClientApplication.java b/src/main/java/pl/cyfronet/indigo/security/ClientApplication.java index 8f0e165..68c748a 100644 --- a/src/main/java/pl/cyfronet/indigo/security/ClientApplication.java +++ b/src/main/java/pl/cyfronet/indigo/security/ClientApplication.java @@ -35,6 +35,9 @@ public class ClientApplication { @Value("${unity.server.clientSecret}") private String clientSecret; + @Value("${auth.returnPoint.iam}") + private String preEstablishedRedirectUri; + @Value("#{'${unity.scopes}'.split(',')}") private List scopesList; @@ -49,7 +52,8 @@ public OAuth2ProtectedResourceDetails resource() { resource.setClientSecret(clientSecret); resource.setUserAuthorizationUri(authorize); resource.setAccessTokenUri(token); - resource.setUseCurrentUri(true); + resource.setUseCurrentUri(false); + resource.setPreEstablishedRedirectUri(preEstablishedRedirectUri); resource.setScope(scopesList); return resource; } diff --git a/src/main/resources/auth.properties b/src/main/resources/auth.properties index bc57759..661785c 100644 --- a/src/main/resources/auth.properties +++ b/src/main/resources/auth.properties @@ -12,4 +12,4 @@ unity.server.userInfoAction=/userinfo unity.entryPointUnityUrl=/auth unity.entryPointAuthUrl=/auth unity.unauthorizedAction=/unauthorized - +auth.returnPoint.iam=https://localhost:8443/auth