Skip to content

Commit

Permalink
Fix bug with URL parsing (#233)
Browse files Browse the repository at this point in the history
* Fix bug with URL parsing

* Bump version
  • Loading branch information
PaulAsjes authored May 22, 2024
1 parent 2bdb998 commit 1f6d040
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/UserManagement.php
Original file line number Diff line number Diff line change
Expand Up @@ -1082,7 +1082,7 @@ public function getJwksUrl(string $clientId)

$baseUrl = WorkOS::getApiBaseUrl();

return "{$baseUrl}/sso/jwks/{$clientId}";
return "{$baseUrl}sso/jwks/{$clientId}";
}

/**
Expand All @@ -1100,6 +1100,6 @@ public function getLogoutUrl(string $sessionId)

$baseUrl = WorkOS::getApiBaseUrl();

return "{$baseUrl}/user_management/sessions/logout?session_id={$sessionId}";
return "{$baseUrl}user_management/sessions/logout?session_id={$sessionId}";
}
}
2 changes: 1 addition & 1 deletion lib/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
final class Version
{
public const SDK_IDENTIFIER = "WorkOS PHP";
public const SDK_VERSION = '4.8.0';
public const SDK_VERSION = '4.8.1';
}
4 changes: 2 additions & 2 deletions tests/WorkOS/UserManagementTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1088,7 +1088,7 @@ public function testGetJwksUrl()
$result = $this->userManagement->getJwksUrl($clientId);

$baseUrl = WorkOS::getApiBaseUrl();
$expected = "{$baseUrl}/sso/jwks/{$clientId}";
$expected = "{$baseUrl}sso/jwks/{$clientId}";

$this->assertSame($result, $expected);
}
Expand All @@ -1111,7 +1111,7 @@ public function testGetLogoutUrl()
$result = $this->userManagement->getLogoutUrl($sessionId);

$baseUrl = WorkOS::getApiBaseUrl();
$expected = "{$baseUrl}/user_management/sessions/logout?session_id={$sessionId}";
$expected = "{$baseUrl}user_management/sessions/logout?session_id={$sessionId}";

$this->assertSame($result, $expected);
}
Expand Down

0 comments on commit 1f6d040

Please sign in to comment.