Esempio n. 1
0
 public function testSetupServerSide()
 {
     $this->keyManagerMock->expects($this->exactly(2))->method('userHasKeys')->with('admin')->willReturnOnConsecutiveCalls(true, false);
     $this->assertTrue($this->instance->setupServerSide('admin', 'password'));
     $this->keyManagerMock->expects($this->once())->method('storeKeyPair')->with('admin', 'password')->willReturn(false);
     $this->assertFalse($this->instance->setupServerSide('admin', 'password'));
 }
Esempio n. 2
0
 /**
  * after password reset we create a new key pair for the user
  *
  * @param array $params
  */
 public function postPasswordReset($params)
 {
     $password = $params['password'];
     $this->keyManager->replaceUserKeys($params['uid']);
     $this->userSetup->setupServerSide($params['uid'], $password);
 }