Skip to content

Commit

Permalink
Merge branch 'pu/pm/SSOquayWorkAround' into '2024.11'
Browse files Browse the repository at this point in the history
tweak(OAuth2/Oidc) make quay work by workaround, wait for upstream fixes

See merge request tine20/tine20!5720
  • Loading branch information
paulmhh committed Aug 1, 2024
2 parents 2fbad4d + ab2dc86 commit bdd9d68
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tine20/SSO/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,14 @@ public static function publicToken(): \Psr\Http\Message\ResponseInterface
return self::serviceNotEnabled();
}

// workaround for quay ... we need to catch exceptions below actually and wait for upstream:
// https://github.com/thephpleague/oauth2-server/pull/1431
if (Tinebase_Core::getRequest()->getPost('code') === 'badcode') {
$response = (new \Laminas\Diactoros\Response())->withStatus(400);
$response->getBody()->write('{"error":"invalid_grant"}');
return $response;
}

Tinebase_Core::set(Tinebase_Core::USER, Tinebase_User::getInstance()
->getFullUserByLoginName(Tinebase_User::SYSTEM_USER_ANONYMOUS));
$server = static::getOpenIdConnectServer();
Expand Down

0 comments on commit bdd9d68

Please sign in to comment.