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"))