public static function get($href, array $options = array()) { if (substr($href, 0 - strlen(self::PATH)) != self::PATH) { $href = $href . '/' . self::PATH; } return Client::get($href, Stormpath::LINKEDIN_PROVIDER, Directory::PATH, $options); }
/** * Retreive a SAML Provider based on the Href. * * @since 1.13.0 * @param string $href * @param array $options * @return \Stormpath\Resource\SamlProvider */ public static function get($href, array $options = []) { if (substr($href, 0 - strlen(self::PATH)) != self::PATH) { $href = $href . '/' . self::PATH; } return Client::get($href, Stormpath::SAML_PROVIDER, null, $options); }
public function testShouldBeAbleToGetAccountViaHTMLFragment() { $account = \Stormpath\Resource\Account::instantiate(array('givenName' => 'Account Name', 'middleName' => 'Middle Name', 'surname' => 'Surname', 'username' => md5(time() . microtime() . uniqid()) . 'username', 'email' => md5(time() . microtime() . uniqid()) . '@unknown123.kot', 'password' => 'superP4ss')); self::$directory->createAccount($account); $href = $account->href; $hrefParts = array_reverse(explode('/', $account->href)); $acct = \Stormpath\Resource\Account::get($hrefParts[0]); $this->assertInstanceOf('\\Stormpath\\Resource\\Account', $account); $this->assertEquals($href, $acct->href); $acct2 = \Stormpath\Client::get($hrefParts[1] . '/' . $hrefParts[0], Stormpath::ACCOUNT); $this->assertInstanceOf('\\Stormpath\\Resource\\Account', $acct2); $this->assertEquals($href, $acct2->href); $account->delete(); }
public static function get($href, array $options = array()) { return Client::get($href, self::class, self::PATH, $options); }
/** * @param $href * @param array $options * @return mixed */ public static function get($href, array $options = array()) { return Client::get($href, Stormpath::OAUTH_POLICY, self::PATH, $options); }
public static function get($href, array $options = array()) { return Client::get($href, Stormpath::APPLICATION, self::PATH, $options); }
public function testShouldBeAbleToGetGroupViaHTMLFragment() { $group = \Stormpath\Resource\Group::instantiate(array('name' => makeUniqueName('GroupTest htmlFragment'))); self::$directory->createGroup($group); $href = $group->href; $hrefParts = array_reverse(explode('/', $href)); $group = \Stormpath\Resource\Group::get($hrefParts[0]); $this->assertInstanceOf('\\Stormpath\\Resource\\Group', $group); $this->assertEquals($href, $group->href); $group2 = \Stormpath\Client::get($hrefParts[1] . '/' . $hrefParts[0], Stormpath::GROUP); $this->assertInstanceOf('\\Stormpath\\Resource\\Group', $group2); $this->assertEquals($href, $group2->href); $group->delete(); }
public function testShouldBeAbleToGetApplicationViaHTMLFragment() { $application = \Stormpath\Resource\Application::create(array('name' => makeUniqueName('ApplicationTest testFragment'))); $href = $application->href; $hrefParts = array_reverse(explode('/', $href)); $app = \Stormpath\Resource\Application::get($hrefParts[0]); $this->assertInstanceOf('\\Stormpath\\Resource\\Application', $app); $this->assertEquals($href, $app->href); $app2 = \Stormpath\Client::get($hrefParts[1] . '/' . $hrefParts[0], Stormpath::APPLICATION); $this->assertInstanceOf('\\Stormpath\\Resource\\Application', $app2); $this->assertEquals($href, $app2->href); $application->delete(); }
public static function get($href, array $options = array()) { return Client::get($href, Stormpath::ACCOUNT_STORE_MAPPING, self::PATH, $options); }
/** * @param $href * @param array $options * @return mixed */ public static function get($href, array $options = []) { return Client::get($href, Stormpath::ACCESS_TOKEN, self::PATH, $options); }
public static function get($href, array $options = array()) { return Client::get($href, Stormpath::GROUP_MEMBERSHIP, self::PATH, $options); }
public static function get($href, array $options = array()) { return Client::get($href, Stormpath::DIRECTORY, self::PATH, $options); }
public function testShouldBeAbleToGetDirectoryViaHTMLFragment() { $directory = \Stormpath\Resource\Directory::create(array('name' => makeUniqueName('DirectoryTest htmlFragment'))); $href = $directory->href; $hrefParts = array_reverse(explode('/', $href)); $dir = \Stormpath\Resource\Directory::get($hrefParts[0]); $this->assertInstanceOf('\\Stormpath\\Resource\\Directory', $dir); $this->assertEquals($href, $dir->href); $dir2 = \Stormpath\Client::get($hrefParts[1] . '/' . $hrefParts[0], Stormpath::DIRECTORY); $this->assertInstanceOf('\\Stormpath\\Resource\\Directory', $dir2); $this->assertEquals($href, $dir2->href); $directory->delete(); }