Skip to content

Commit

Permalink
fix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
memurats committed Feb 4, 2025
1 parent b3eb816 commit adedcc5
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 24 deletions.
12 changes: 6 additions & 6 deletions lib/Controller/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -542,12 +542,12 @@ public function code(string $state = '', string $code = '', string $scope = '',

// $tokenExchangeEnabled = (isset($oidcSystemConfig['token_exchange']) && $oidcSystemConfig['token_exchange'] === true);
// if ($tokenExchangeEnabled) {
// store all token information for potential token exchange requests
// $tokenData = array_merge(
// $data,
// ['provider_id' => $providerId],
// );
// $this->tokenService->storeToken($tokenData);
// store all token information for potential token exchange requests
// $tokenData = array_merge(
// $data,
// ['provider_id' => $providerId],
// );
// $this->tokenService->storeToken($tokenData);
// }
// $this->config->setUserValue($user->getUID(), Application::APP_ID, 'had_token_once', '1');

Expand Down
35 changes: 17 additions & 18 deletions tests/unit/MagentaCloud/ProvisioningEventServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
use OCP\IDBConnection;
use OCP\IGroupManager;
use OCP\IL10N; // deprecated!
use OCP\ILogger;
use OCP\IRequest;
use OCP\ISession;
use OCP\IURLGenerator;
Expand Down Expand Up @@ -221,23 +220,23 @@ public function setUp(): void {
$this->response = $this->getMockForAbstractClass(IResponse::class);
//$this->usersession = $this->getMockForAbstractClass(IUserSession::class);
$this->usersession = $this->getMockBuilder(IUserSession::class)
->disableOriginalConstructor()
->onlyMethods([
'setUser',
'login',
'logout',
'getUser',
'isLoggedIn',
'getImpersonatingUserID',
'setImpersonatingUserID',
'setVolatileActiveUser' // Diese Methode hinzufügen, falls sie gebraucht wird.
])
->addMethods([
'completeLogin',
'createSessionToken',
'createRememberMeToken'
])
->getMock();
->disableOriginalConstructor()
->onlyMethods([
'setUser',
'login',
'logout',
'getUser',
'isLoggedIn',
'getImpersonatingUserID',
'setImpersonatingUserID',
'setVolatileActiveUser' // Diese Methode hinzufügen, falls sie gebraucht wird.
])
->addMethods([
'completeLogin',
'createSessionToken',
'createRememberMeToken'
])
->getMock();

$this->usermanager = $this->getUserManagerSetup();
$this->groupmanager = $this->getMockForAbstractClass(IGroupManager::class);
Expand Down

0 comments on commit adedcc5

Please sign in to comment.