fkooman\RemoteStorage\RemoteStorageClientStorage::getClient PHP Метод

getClient() публичный Метод

Retrieve a client based on clientId, responseType, redirectUri and scope. The parameters except the clientId are optional and are used to support non-registered clients.
public getClient ( string $clientId, string | null $responseType = null, string | null $redirectUri = null, string | null $scope = null ) : fkooman\OAuth\Client | false
$clientId string the clientId
$responseType string | null the responseType or null
$redirectUri string | null the redirectUri or null
$scope string | null the scope or null
Результат fkooman\OAuth\Client | false if the client exists with the clientId it returns Client, otherwise false
    public function getClient($clientId, $responseType = null, $redirectUri = null, $scope = null)
    {
        $clientId = self::normalizeRedirectUriOrigin($redirectUri);
        return new Client($clientId, $responseType, $redirectUri, $scope, null);
    }

Usage Example

 public function testBasicOtherScheme()
 {
     $r = new RemoteStorageClientStorage();
     $client = $r->getClient('app://callback', 'token', 'app://callback/bar', 'foo bar');
     $this->assertEquals('app://callback', $client->getClientId());
 }
RemoteStorageClientStorage