diff --git a/app/library/App/Controllers/UserController.php b/app/library/App/Controllers/UserController.php index acc4eb1..86bd50e 100755 --- a/app/library/App/Controllers/UserController.php +++ b/app/library/App/Controllers/UserController.php @@ -20,7 +20,7 @@ class UserController extends CrudResourceController { $username = $this->request->getUsername(); $password = $this->request->getPassword(); - return \App\Auth\UsernameAccountType::NAME; + $session = $this->authManager->loginWithUsernamePassword(\App\Auth\UsernameAccountType::NAME, $username, $password); diff --git a/app/library/App/Resources/UserResource.php b/app/library/App/Resources/UserResource.php index 7c9f973..21009b6 100755 --- a/app/library/App/Resources/UserResource.php +++ b/app/library/App/Resources/UserResource.php @@ -33,7 +33,7 @@ class UserResource extends ApiResource { ) ->endpoint(ApiEndpoint::post('/authenticate', 'authenticate') - //->allow(AclRoles::UNAUTHORIZED) + ->allow(AclRoles::UNAUTHORIZED) //->deny(AclRoles::AUTHORIZED) ->description('Authenticates user credentials provided in the authorization header and returns an access token') ->exampleResponse([ @@ -45,6 +45,6 @@ class UserResource extends ApiResource { ; - $this->endpoint(ApiEndpoint::post('/registration', 'registration')); + //$this->endpoint(ApiEndpoint::post('/registration', 'registration')); } } \ No newline at end of file -- libgit2 0.21.4