Skip to content

Commit

Permalink
solve merge issue
Browse files Browse the repository at this point in the history
  • Loading branch information
memurats committed Feb 4, 2025
1 parent f6c6e55 commit 4ee1543
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions lib/Controller/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -781,16 +781,6 @@ private function getBackchannelLogoutErrorResponse(
);
}

private function toCodeChallenge(string $data): string {
// Basically one big work around for the base64url decode being weird
$h = pack('H*', hash('sha256', $data));
$s = base64_encode($h); // Regular base64 encoder
$s = explode('=', $s)[0]; // Remove any trailing '='s
$s = str_replace('+', '-', $s); // 62nd char of encoding
$s = str_replace('/', '_', $s); // 63rd char of encoding
return $s;
}

private function isMobileDevice(): bool {
$mobileKeywords = $this->config->getSystemValue('user_oidc.mobile_keywords', ['Android', 'iPhone', 'iPad', 'iPod', 'Windows Phone', 'Mobile', 'webOS', 'BlackBerry', 'Opera Mini', 'IEMobile']);

Expand All @@ -806,4 +796,14 @@ private function isMobileDevice(): bool {

return false; // device is desktop
}

private function toCodeChallenge(string $data): string {
// Basically one big work around for the base64url decode being weird
$h = pack('H*', hash('sha256', $data));
$s = base64_encode($h); // Regular base64 encoder
$s = explode('=', $s)[0]; // Remove any trailing '='s
$s = str_replace('+', '-', $s); // 62nd char of encoding
$s = str_replace('/', '_', $s); // 63rd char of encoding
return $s;
}
}

0 comments on commit 4ee1543

Please sign in to comment.