To docker Image

This commit is contained in:
JonatanRek
2020-05-15 22:45:31 +02:00
parent ded8a698f0
commit 619386d391
104 changed files with 52 additions and 13 deletions

View File

@@ -1,25 +0,0 @@
<?php
class AuthApi {
public function login(){
$token = (new AuthManager)->getToken($this->input->username,$this->input->password);
if (!$token) {
throw new Exception("Auth failed", 401);
}
$this->response(['token' => $token]);
}
public function logout(){
$authenticationBearrer = $_SERVER['HTTP_AUTHORIZATION'];
if (!(new AuthManager)->deleteToken($authenticationBearrer)) {
throw new Exception("logout Failed", 401);
}
}
public function registration(){
}
public function restartPassword(){
}
}