commit | badb934ec1295fcbe209fa21937a5927bbcd90ae | [log] [tgz] |
---|---|---|
author | margaretha <margaretha@ids-mannheim.de> | Fri Feb 03 13:38:32 2023 +0100 |
committer | margaretha <margaretha@ids-mannheim.de> | Fri Feb 03 13:39:00 2023 +0100 |
tree | 5981b3bf174f05e069c553ef9b922ad5468a9806 | |
parent | b706d7c314fb97ed4c9f30fcc3aa05aac1431510 [diff] |
Added authorization scope Change-Id: I3beadd9c5d0493affd5213be367f2d287a687e60
diff --git a/src/main/java/de/ids_mannheim/korap/client/OAuth2Service.java b/src/main/java/de/ids_mannheim/korap/client/OAuth2Service.java index 0063540..6fa1a0e 100644 --- a/src/main/java/de/ids_mannheim/korap/client/OAuth2Service.java +++ b/src/main/java/de/ids_mannheim/korap/client/OAuth2Service.java
@@ -20,6 +20,9 @@ private String clientId; @Value("${client.secret}") private String clientSecret; + + @Value("${oauth.scope}") + private String scope; @Value("${korap.authorize.url}") private String korapAuthorizeUrl; @@ -33,6 +36,7 @@ String encodedURL = URLEncoder.encode(redirectUri, "UTF-8"); String locationUri = korapAuthorizeUrl + "/authorize?client_id=" + clientId + "&redirect_uri=" + encodedURL + + "&scope=" + scope + "&response_type=code&state=ZMwDGTZ2RY"; RedirectView redirectView = new RedirectView();
diff --git a/src/test/java/de/ids_mannheim/korap/client/OAuth2ClientApplicationTests.java b/src/test/java/de/ids_mannheim/korap/client/OAuth2ClientApplicationTests.java index 1f57087..cad4f91 100644 --- a/src/test/java/de/ids_mannheim/korap/client/OAuth2ClientApplicationTests.java +++ b/src/test/java/de/ids_mannheim/korap/client/OAuth2ClientApplicationTests.java
@@ -67,6 +67,7 @@ String encodedURL = URLEncoder.encode(redirectUri, "UTF-8"); String locationUri = korapAuthorizeUrl + "/authorize?client_id=" + clientId + "&redirect_uri=" + encodedURL + + "&scope=search" + "&response_type=code&state=ZMwDGTZ2RY"; mockMvc.perform(get("/authorize"))