Skip to content

Commit

Permalink
chore: add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Thulin committed Jan 17, 2025
1 parent 08d8810 commit 30d0ad5
Showing 1 changed file with 23 additions and 4 deletions.
27 changes: 23 additions & 4 deletions library/Integrations/MiniOrange/AllowRedirectAfterSsoLogin.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,24 @@ public function addHooks(): void
$this->wpService->addAction('set_logged_in_cookie', [$this, 'setLoggedInCookieFilterProxy'], 10, 4);
}

/**
* Set logged in cookie filter proxy.
*
* @param string $loggedInCookie
* @param int $expire
* @param int $expiration
* @param int $userId
*
* @suppress PhanUnusedVariable, IntelephenseUnusedVariable
*
* @return void
*/
public function setLoggedInCookieFilterProxy(string $loggedInCookie, int $expire, int $expiration, int $userId) {
$this->allowRedirectAfterSsoLogin($userId);
}

/**
* Allow redirect after SSO login.
*
* @suppress PhanUnusedVariable, IntelephenseUnusedVariable
*
* @return void
*/
Expand All @@ -56,11 +66,20 @@ public function allowRedirectAfterSsoLogin(int $userId): void
}
}

/** */
private function getRelayState (): ?string {
/**
* Get RelayState.
*
* @return string|null
*/
private function getRelayState(): ?string {
return $_POST['RelayState'] ?? null;
}

/**
* Get SAML response.
*
* @return string|null
*/
private function getSamlResponse(): ?string
{
return $_POST['SAMLResponse'] ?? null;
Expand Down

0 comments on commit 30d0ad5

Please sign in to comment.