Changing path for authentication method
This commit is contained in:
parent
bf23b137d7
commit
4943c98428
|
@ -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 } )
|
||||
|
|
|
@ -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( );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue