diff --git a/full/src/test/java/de/ids_mannheim/korap/web/controller/AvailabilityTest.java b/full/src/test/java/de/ids_mannheim/korap/web/controller/AvailabilityTest.java
index 927e3f0..98502ea 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/controller/AvailabilityTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/controller/AvailabilityTest.java
@@ -169,14 +169,14 @@
 
 
 
-    private ClientResponse builtSimpleClientResponse (String collectionQuery) {
+    private ClientResponse searchQuery (String collectionQuery) {
         return resource().path("search").queryParam("q", "[orth=das]")
                 .queryParam("ql", "poliqarp").queryParam("cq", collectionQuery)
                 .get(ClientResponse.class);
     }
 
 
-    private ClientResponse builtClientResponseWithIP (String collectionQuery,
+    private ClientResponse searchQueryWithIP (String collectionQuery,
             String ip) throws UniformInterfaceException, ClientHandlerException,
             KustvaktException {
         return resource().path("search").queryParam("q", "[orth=das]")
@@ -192,7 +192,7 @@
     @Test
     public void testAvailabilityFreeAuthorized () throws KustvaktException {
         ClientResponse response =
-                builtSimpleClientResponse("availability = CC-BY-SA");
+                searchQuery("availability = CC-BY-SA");
 
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
                 response.getStatus());
@@ -205,7 +205,7 @@
     public void testAvailabilityRegexFreeAuthorized ()
             throws KustvaktException {
         ClientResponse response =
-                builtSimpleClientResponse("availability = /.*BY.*/");
+                searchQuery("availability = /.*BY.*/");
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
                 response.getStatus());
 
@@ -216,7 +216,7 @@
     @Test
     public void testAvailabilityFreeUnauthorized () throws KustvaktException {
         ClientResponse response =
-                builtSimpleClientResponse("availability = ACA-NC");
+                searchQuery("availability = ACA-NC");
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
                 response.getStatus());
 
@@ -228,7 +228,7 @@
     public void testAvailabilityRegexFreeUnauthorized ()
             throws KustvaktException {
         ClientResponse response =
-                builtSimpleClientResponse("availability = /ACA.*/");
+                searchQuery("availability = /ACA.*/");
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
                 response.getStatus());
 
@@ -237,7 +237,7 @@
 
     @Test
     public void testAvailabilityRegexNoRewrite () throws KustvaktException {
-        ClientResponse response = builtSimpleClientResponse(
+        ClientResponse response = searchQuery(
                 "availability = /CC-BY.*/ & availability = /ACA.*/");
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
                 response.getStatus());
@@ -266,7 +266,7 @@
     public void testAvailabilityRegexFreeUnauthorized3 ()
             throws KustvaktException {
         ClientResponse response =
-                builtSimpleClientResponse("availability = /.*NC.*/");
+                searchQuery("availability = /.*NC.*/");
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
                 response.getStatus());
         //        System.out.println(response.getEntity(String.class));
@@ -279,7 +279,7 @@
     public void testNegationAvailabilityFreeUnauthorized ()
             throws KustvaktException {
         ClientResponse response =
-                builtSimpleClientResponse("availability != /CC-BY.*/");
+                searchQuery("availability != /CC-BY.*/");
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
                 response.getStatus());
 
@@ -290,7 +290,7 @@
     public void testNegationAvailabilityFreeUnauthorized2 ()
             throws KustvaktException {
         ClientResponse response =
-                builtSimpleClientResponse("availability != /.*BY.*/");
+                searchQuery("availability != /.*BY.*/");
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
                 response.getStatus());
 
@@ -300,7 +300,7 @@
     @Test
     public void testNegationAvailabilityWithOperationOrUnauthorized ()
             throws KustvaktException {
-        ClientResponse response = builtSimpleClientResponse(
+        ClientResponse response = searchQuery(
                 "availability = /CC-BY.*/ | availability != /CC-BY.*/");
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
                 response.getStatus());
@@ -310,7 +310,7 @@
     @Test
     public void testComplexNegationAvailabilityFreeUnauthorized ()
             throws KustvaktException {
-        ClientResponse response = builtSimpleClientResponse(
+        ClientResponse response = searchQuery(
                 "textClass=politik & availability != /CC-BY.*/");
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
                 response.getStatus());
@@ -322,7 +322,7 @@
     @Test
     public void testComplexAvailabilityFreeUnauthorized ()
             throws KustvaktException {
-        ClientResponse response = builtSimpleClientResponse(
+        ClientResponse response = searchQuery(
                 "textClass=politik & availability=ACA-NC");
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
                 response.getStatus());
@@ -334,7 +334,7 @@
     @Test
     public void testComplexAvailabilityFreeUnauthorized3 ()
             throws KustvaktException {
-        ClientResponse response = builtSimpleClientResponse(
+        ClientResponse response = searchQuery(
                 "textClass=politik & availability=/.*NC.*/");
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
                 response.getStatus());
@@ -346,7 +346,7 @@
     @Test
     public void testAvailabilityPublicAuthorized () throws KustvaktException {
         ClientResponse response =
-                builtClientResponseWithIP("availability=ACA-NC", "149.27.0.32");
+                searchQueryWithIP("availability=ACA-NC", "149.27.0.32");
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
                 response.getStatus());
 
@@ -356,7 +356,7 @@
 
     @Test
     public void testAvailabilityPublicUnauthorized () throws KustvaktException {
-        ClientResponse response = builtClientResponseWithIP(
+        ClientResponse response = searchQueryWithIP(
                 "availability=QAO-NC-LOC:ids", "149.27.0.32");
 
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
@@ -369,7 +369,7 @@
     @Test
     public void testAvailabilityRegexPublicAuthorized ()
             throws KustvaktException {
-        ClientResponse response = builtClientResponseWithIP(
+        ClientResponse response = searchQueryWithIP(
                 "availability= /ACA.*/", "149.27.0.32");
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
                 response.getStatus());
@@ -381,7 +381,7 @@
     @Test
     public void testNegationAvailabilityPublicUnauthorized ()
             throws KustvaktException {
-        ClientResponse response = builtClientResponseWithIP(
+        ClientResponse response = searchQueryWithIP(
                 "availability != ACA-NC", "149.27.0.32");
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
                 response.getStatus());
@@ -393,7 +393,7 @@
     @Test
     public void testNegationAvailabilityRegexPublicUnauthorized ()
             throws KustvaktException {
-        ClientResponse response = builtClientResponseWithIP(
+        ClientResponse response = searchQueryWithIP(
                 "availability != /ACA.*/", "149.27.0.32");
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
                 response.getStatus());
@@ -405,7 +405,7 @@
     @Test
     public void testComplexAvailabilityPublicUnauthorized ()
             throws KustvaktException {
-        ClientResponse response = builtClientResponseWithIP(
+        ClientResponse response = searchQueryWithIP(
                 "textClass=politik & availability=QAO-NC-LOC:ids",
                 "149.27.0.32");
 
@@ -419,7 +419,7 @@
     @Test
     public void testNegationComplexAvailabilityPublicUnauthorized ()
             throws KustvaktException {
-        ClientResponse response = builtClientResponseWithIP(
+        ClientResponse response = searchQueryWithIP(
                 "textClass=politik & availability!=QAO-NC-LOC:ids",
                 "149.27.0.32");
 
@@ -431,7 +431,7 @@
 
     @Test
     public void testAvailabilityRegexAllAuthorized () throws KustvaktException {
-        ClientResponse response = builtClientResponseWithIP(
+        ClientResponse response = searchQueryWithIP(
                 "availability= /ACA.*/", "10.27.0.32");
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
                 response.getStatus());
@@ -441,7 +441,7 @@
 
     @Test
     public void testAvailabilityOr () throws KustvaktException {
-        ClientResponse response = builtSimpleClientResponse(
+        ClientResponse response = searchQuery(
                 "availability=/CC-BY.*/ | availability=/ACA.*/");
 
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
@@ -452,7 +452,7 @@
 
     @Test
     public void testRedundancyOrPub () throws KustvaktException {
-        ClientResponse response = builtClientResponseWithIP(
+        ClientResponse response = searchQueryWithIP(
                 "availability=/CC-BY.*/ | availability=/ACA.*/ | availability=/QAO-NC/",
                 "149.27.0.32");
 
@@ -467,7 +467,7 @@
 
     @Test
     public void testAvailabilityOrCorpusSigle () throws KustvaktException {
-        ClientResponse response = builtSimpleClientResponse(
+        ClientResponse response = searchQuery(
                 "availability=/CC-BY.*/ | corpusSigle=GOE");
 
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
@@ -478,7 +478,7 @@
 
     @Test
     public void testOrWithoutAvailability () throws KustvaktException {
-        ClientResponse response = builtSimpleClientResponse(
+        ClientResponse response = searchQuery(
                 "corpusSigle=GOE | textClass=politik");
 
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
@@ -489,7 +489,7 @@
 
     @Test
     public void testWithoutAvailability () throws KustvaktException {
-        ClientResponse response = builtSimpleClientResponse("corpusSigle=GOE");
+        ClientResponse response = searchQuery("corpusSigle=GOE");
 
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
                 response.getStatus());
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/controller/OAuth2AccessTokenTest.java b/full/src/test/java/de/ids_mannheim/korap/web/controller/OAuth2AccessTokenTest.java
new file mode 100644
index 0000000..00b1eb6
--- /dev/null
+++ b/full/src/test/java/de/ids_mannheim/korap/web/controller/OAuth2AccessTokenTest.java
@@ -0,0 +1,108 @@
+package de.ids_mannheim.korap.web.controller;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.google.common.net.HttpHeaders;
+import com.sun.jersey.api.client.ClientResponse;
+import com.sun.jersey.api.client.ClientResponse.Status;
+
+import de.ids_mannheim.korap.config.Attributes;
+import de.ids_mannheim.korap.config.SpringJerseyTest;
+import de.ids_mannheim.korap.exceptions.KustvaktException;
+import de.ids_mannheim.korap.exceptions.StatusCodes;
+import de.ids_mannheim.korap.utils.JsonUtils;
+
+public class OAuth2AccessTokenTest extends SpringJerseyTest {
+
+    // test access token for username: dory
+    private static String testAccessToken;
+
+    @BeforeClass
+    public static void init () throws IOException {
+        InputStream is = OAuth2AccessTokenTest.class.getClassLoader()
+                .getResourceAsStream("test-oauth2.token");
+
+        try (BufferedReader reader =
+                new BufferedReader(new InputStreamReader(is));) {
+            testAccessToken = reader.readLine();
+        }
+    }
+
+    @Test
+    public void testListVC () throws KustvaktException {
+        ClientResponse response = resource().path("vc").path("list")
+                .header(Attributes.AUTHORIZATION, "Bearer " + testAccessToken)
+                .get(ClientResponse.class);
+
+        assertEquals(Status.OK.getStatusCode(), response.getStatus());
+        String entity = response.getEntity(String.class);
+        JsonNode node = JsonUtils.readTree(entity);
+        assertEquals(4, node.size());
+    }
+
+    @Test
+    public void testSearchWithOAuth2Token ()
+            throws KustvaktException, IOException {
+        ClientResponse response = resource().path("search")
+                .queryParam("q", "Wasser").queryParam("ql", "poliqarp")
+                .header(Attributes.AUTHORIZATION, "Bearer " + testAccessToken)
+                .header(HttpHeaders.X_FORWARDED_FOR, "149.27.0.32")
+                .get(ClientResponse.class);
+
+        assertEquals(ClientResponse.Status.OK.getStatusCode(),
+                response.getStatus());
+
+        String ent = response.getEntity(String.class);
+        JsonNode node = JsonUtils.readTree(ent);
+        assertNotNull(node);
+        assertEquals(25, node.at("/matches").size());
+    }
+
+    @Test
+    public void testSearchWithUnknownToken ()
+            throws KustvaktException, IOException {
+        ClientResponse response = resource().path("search")
+                .queryParam("q", "Wasser").queryParam("ql", "poliqarp")
+                .header(Attributes.AUTHORIZATION,
+                        "Bearer ljsa8tKNRSczJhk20öhq92zG8z350")
+                .get(ClientResponse.class);
+
+        assertEquals(ClientResponse.Status.UNAUTHORIZED.getStatusCode(),
+                response.getStatus());
+
+        String ent = response.getEntity(String.class);
+        JsonNode node = JsonUtils.readTree(ent);
+        assertEquals(StatusCodes.INVALID_ACCESS_TOKEN,
+                node.at("/errors/0/0").asInt());
+        assertEquals("Access token is not found", node.at("/errors/0/1").asText());
+    }
+
+    @Test
+    public void testSearchWithExpiredToken ()
+            throws KustvaktException, IOException {
+        ClientResponse response = resource().path("search")
+                .queryParam("q", "Wasser").queryParam("ql", "poliqarp")
+                .header(Attributes.AUTHORIZATION,
+                        "Bearer fia0123ikBWn931470H8s5gRqx7Moc4p")
+                .get(ClientResponse.class);
+
+        String ent = response.getEntity(String.class);
+        
+        assertEquals(ClientResponse.Status.UNAUTHORIZED.getStatusCode(),
+                response.getStatus());
+
+        JsonNode node = JsonUtils.readTree(ent);
+        assertEquals(StatusCodes.EXPIRED, node.at("/errors/0/0").asInt());
+        assertEquals("Access token is expired", node.at("/errors/0/1").asText());
+    }
+}
diff --git a/full/src/test/resources/test-config.xml b/full/src/test/resources/test-config.xml
index 964487a..75edbc4 100644
--- a/full/src/test/resources/test-config.xml
+++ b/full/src/test/resources/test-config.xml
@@ -252,6 +252,10 @@
 		<constructor-arg type="de.ids_mannheim.korap.interfaces.EncryptionIface"
 			ref="kustvakt_encryption" />
 	</bean>
+	
+	<bean id="oauth2_auth"
+		class="de.ids_mannheim.korap.authentication.OAuth2Authentication" />
+	
 
 	<util:list id="kustvakt_authproviders"
 		value-type="de.ids_mannheim.korap.interfaces.AuthenticationIface">
@@ -260,6 +264,7 @@
 		<ref bean="session_auth" />
 		<!-- <ref bean="api_auth" /> -->
 		<ref bean="openid_auth" />
+		<ref bean="oauth2_auth" />
 	</util:list>
 
 
diff --git a/full/src/test/resources/test-oauth2.token b/full/src/test/resources/test-oauth2.token
new file mode 100644
index 0000000..eb7b4af
--- /dev/null
+++ b/full/src/test/resources/test-oauth2.token
@@ -0,0 +1 @@
+249c64a77f40e2b5504982cc5521b596
\ No newline at end of file
