getAuthenticationPath() public method

Gets the path to the authentication script
public getAuthenticationPath ( ) : string
return string
Esempio n. 1
0
 public function testLoadsFullJsonConfig()
 {
     $obj = new SqrlConfiguration();
     $obj->load(__DIR__ . '/Resources/allOptional.json');
     $this->assertEquals(array(1), $obj->getAcceptedVersions());
     $this->assertEquals('otherdomain.com', $obj->getDomain());
     $this->assertEquals('sqrl.php', $obj->getAuthenticationPath());
     $this->assertEquals('My Example Server', $obj->getFriendlyName());
     $this->assertTrue($obj->getSecure());
     $this->assertTrue($obj->getAnonAllowed());
     $this->assertEquals(9, $obj->getNonceMaxAge());
     $this->assertEquals(250, $obj->getQrHeight());
     $this->assertEquals(5, $obj->getQrPadding());
     $this->assertEquals('gibberish data', $obj->getNonceSalt());
 }
Esempio n. 2
0
 public function generateQry()
 {
     $currentPathParts = parse_url($this->configuration->getAuthenticationPath());
     $pathAppend = (empty($currentPathParts['query']) ? '?' : '&') . 'nut=';
     return $this->configuration->getAuthenticationPath() . $pathAppend . $this->getNonce();
 }