Skip to content

Commit

Permalink
#28 Add configurable redirect uri
Browse files Browse the repository at this point in the history
  • Loading branch information
kmarszalek committed Nov 22, 2019
1 parent 57f1e10 commit 25853e9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> scopesList;

Expand All @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/auth.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ unity.server.userInfoAction=/userinfo
unity.entryPointUnityUrl=/auth
unity.entryPointAuthUrl=/auth
unity.unauthorizedAction=/unauthorized

auth.returnPoint.iam=https://localhost:8443/auth

0 comments on commit 25853e9

Please sign in to comment.