This is an automated email from the ASF dual-hosted git repository.

martin_s pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/archiva-redback-core.git

commit 4943c9842824c4578ab7a9bec83b0d3c2b0cf5e0
Author: Martin Stockhammer <[email protected]>
AuthorDate: Tue Jul 14 07:21:42 2020 +0200

    Changing path for authentication method
---
 .../archiva/redback/rest/api/services/v2/AuthenticationService.java | 2 +-
 .../redback/rest/services/v2/NativeAuthenticationServiceTest.java   | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/redback-integrations/redback-rest/redback-rest-api/src/main/java/org/apache/archiva/redback/rest/api/services/v2/AuthenticationService.java
 
b/redback-integrations/redback-rest/redback-rest-api/src/main/java/org/apache/archiva/redback/rest/api/services/v2/AuthenticationService.java
index 3d387d0..f9af1ed 100644
--- 
a/redback-integrations/redback-rest/redback-rest-api/src/main/java/org/apache/archiva/redback/rest/api/services/v2/AuthenticationService.java
+++ 
b/redback-integrations/redback-rest/redback-rest-api/src/main/java/org/apache/archiva/redback/rest/api/services/v2/AuthenticationService.java
@@ -75,7 +75,7 @@ public interface AuthenticationService
      * The bearer token can be added to the HTTP header on further requests to 
authenticate.
      *
      */
-    @Path( "token" )
+    @Path( "authenticate" )
     @POST
     @RedbackAuthorization( noRestriction = true, noPermission = true )
     @Produces( { MediaType.APPLICATION_JSON } )
diff --git 
a/redback-integrations/redback-rest/redback-rest-services/src/test/java/org/apache/archiva/redback/rest/services/v2/NativeAuthenticationServiceTest.java
 
b/redback-integrations/redback-rest/redback-rest-services/src/test/java/org/apache/archiva/redback/rest/services/v2/NativeAuthenticationServiceTest.java
index fea3392..a3373ee 100644
--- 
a/redback-integrations/redback-rest/redback-rest-services/src/test/java/org/apache/archiva/redback/rest/services/v2/NativeAuthenticationServiceTest.java
+++ 
b/redback-integrations/redback-rest/redback-rest-services/src/test/java/org/apache/archiva/redback/rest/services/v2/NativeAuthenticationServiceTest.java
@@ -99,7 +99,7 @@ public class NativeAuthenticationServiceTest extends 
AbstractNativeRestServices
         Response result = given( ).spec( getRequestSpec( ) )
             .contentType( JSON )
             .body( jsonAsMap )
-            .when( ).post( "/token").then( ).statusCode( 200 )
+            .when( ).post( "/authenticate").then( ).statusCode( 200 )
             .extract( ).response( );
         assertNotNull( result.body( ).jsonPath( ).getString( "access_token" ) 
);
         assertNotNull( result.body( ).jsonPath( ).getString( "refresh_token" ) 
);
@@ -114,7 +114,7 @@ public class NativeAuthenticationServiceTest extends 
AbstractNativeRestServices
         Response result = given( ).spec( getRequestSpec( ) )
             .contentType( JSON )
             .body( jsonAsMap )
-            .when( ).post( "/token").then( ).statusCode( 403 )
+            .when( ).post( "/authenticate").then( ).statusCode( 403 )
             .extract( ).response( );
     }
 
@@ -127,7 +127,7 @@ public class NativeAuthenticationServiceTest extends 
AbstractNativeRestServices
         Response result = given( ).spec( getRequestSpec( ) )
             .contentType( JSON )
             .body( jsonAsMap )
-            .when( ).post( "/token").then( ).statusCode( 401 )
+            .when( ).post( "/authenticate").then( ).statusCode( 401 )
             .extract( ).response( );
     }
 

Reply via email to