
Refactoring of nonce/token/auth service Now nonce and token service use a generator class to generate the values for nonces, auth codes, access tokens and refresh token. So in this way, all the knowlegde on how values are created are on one single place, also this generator class allows to generate unique values per class (nonnce, auth code, and so on) Change-Id: Iaac8406aa23145a1ea1a61040707b72fa4faed1d
20 lines
793 B
PHP
20 lines
793 B
PHP
<?php
|
|
|
|
use openid\XRDS\XRDSDocumentBuilder;
|
|
use openid\XRDS\XRDSService;
|
|
|
|
class XRDSDocumentTest extends TestCase
|
|
{
|
|
public function testBuildDocument()
|
|
{
|
|
$services = array();
|
|
array_push($services,
|
|
new XRDSService(0, "http://specs.openid.net/auth/2.0/server", "https://dev.openstackid.com",
|
|
array("http://openid.net/srv/ax/1.0", "http://specs.openid.net/extensions/pape/1.0")));
|
|
$builder = new XRDSDocumentBuilder($services);
|
|
$xrds = $builder->render();
|
|
$this->assertTrue(!empty($xrds) && str_contains($xrds,
|
|
"http://specs.openid.net/auth/2.0/server") && str_contains($xrds,
|
|
"http://openid.net/srv/ax/1.0") && str_contains($xrds, "http://specs.openid.net/extensions/pape/1.0"));
|
|
}
|
|
} |