Commit 9755b78a7e29cdd179b94bddbab57926b7776040
1 parent
fb1232a7
test
Showing
2 changed files
with
3 additions
and
3 deletions
Show diff stats
app/library/App/Controllers/UserController.php
@@ -20,7 +20,7 @@ class UserController extends CrudResourceController | @@ -20,7 +20,7 @@ class UserController extends CrudResourceController | ||
20 | { | 20 | { |
21 | $username = $this->request->getUsername(); | 21 | $username = $this->request->getUsername(); |
22 | $password = $this->request->getPassword(); | 22 | $password = $this->request->getPassword(); |
23 | - return \App\Auth\UsernameAccountType::NAME; | 23 | + |
24 | $session = $this->authManager->loginWithUsernamePassword(\App\Auth\UsernameAccountType::NAME, $username, | 24 | $session = $this->authManager->loginWithUsernamePassword(\App\Auth\UsernameAccountType::NAME, $username, |
25 | $password); | 25 | $password); |
26 | 26 |
app/library/App/Resources/UserResource.php
@@ -33,7 +33,7 @@ class UserResource extends ApiResource { | @@ -33,7 +33,7 @@ class UserResource extends ApiResource { | ||
33 | ) | 33 | ) |
34 | 34 | ||
35 | ->endpoint(ApiEndpoint::post('/authenticate', 'authenticate') | 35 | ->endpoint(ApiEndpoint::post('/authenticate', 'authenticate') |
36 | - //->allow(AclRoles::UNAUTHORIZED) | 36 | + ->allow(AclRoles::UNAUTHORIZED) |
37 | //->deny(AclRoles::AUTHORIZED) | 37 | //->deny(AclRoles::AUTHORIZED) |
38 | ->description('Authenticates user credentials provided in the authorization header and returns an access token') | 38 | ->description('Authenticates user credentials provided in the authorization header and returns an access token') |
39 | ->exampleResponse([ | 39 | ->exampleResponse([ |
@@ -45,6 +45,6 @@ class UserResource extends ApiResource { | @@ -45,6 +45,6 @@ class UserResource extends ApiResource { | ||
45 | 45 | ||
46 | ; | 46 | ; |
47 | 47 | ||
48 | - $this->endpoint(ApiEndpoint::post('/registration', 'registration')); | 48 | + //$this->endpoint(ApiEndpoint::post('/registration', 'registration')); |
49 | } | 49 | } |
50 | } | 50 | } |
51 | \ No newline at end of file | 51 | \ No newline at end of file |