Changing path for authentication method

This commit is contained in:
Martin Stockhammer 2020-07-14 07:21:42 +02:00
parent bf23b137d7
commit 4943c98428
2 changed files with 4 additions and 4 deletions

View File

@ -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 } )

View File

@ -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( );
}