fix api urls
This commit is contained in:
@@ -23,7 +23,8 @@ class ElixFormsAuthenticationClient {
|
||||
* @throws ElixFormsException Se le credenziali sono errate o c'è un errore server
|
||||
*/
|
||||
public function login(string $username, string $password): string {
|
||||
$url = $this->baseUrl . '/eF/services/api/authentication/login/v1';
|
||||
$this->baseUrl = rtrim($this->baseUrl,'/');
|
||||
$url = "{$this->baseUrl}/services/api/authentication/login/v1";
|
||||
|
||||
try {
|
||||
$response = $this->httpClient->post($url, [
|
||||
@@ -64,7 +65,7 @@ class ElixFormsAuthenticationClient {
|
||||
* @throws ElixFormsException Se c'è un errore durante il logout
|
||||
*/
|
||||
public function logout(string $username, string $token): bool {
|
||||
$url = $this->baseUrl . '/eF/services/api/authentication/' . urlencode($username) . '/logout/v1';
|
||||
$url = "{$this->baseUrl}/services/api/authentication/" . urlencode($username) . '/logout/v1';
|
||||
|
||||
try {
|
||||
$response = $this->httpClient->post($url, [
|
||||
|
||||
Reference in New Issue
Block a user