CleanUp After Docker Try

This commit is contained in:
JonatanRek
2020-05-16 17:18:27 +02:00
parent 2f638d8091
commit 090b9f7a7b
123 changed files with 5265 additions and 0 deletions

25
app/api/AuthApi.php Normal file
View File

@@ -0,0 +1,25 @@
<?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(){
}
}