concrete/src/Api/OAuth/Client/ClientFactory.php
public function createClient($name, $redirect, array $scopes, $key, $secret)
    {
        $client = $this->app->make(Client::class);
        $client->setName($name);
        $client->setRedirectUri($redirect);
        // @TODO support scopes
        //$client->setScopes($scopes);
        $client->setClientKey($key);
        $client->setClientSecret($secret);

        // Apply a new UUID to the client
        $id = $this->generator->generate($this->entityManager, $client);
        $client->setIdentifier($id);

        return $client;
    }
public function createClient($name, $redirect, array $scopes, $key, $secret)
    {
        $client = $this->app->make(Client::class);
        $client->setName($name);
        $client->setRedirectUri($redirect);
        // @TODO support scopes
        //$client->setScopes($scopes);
        $client->setClientKey($key);
        $client->setClientSecret($secret);

        // Apply a new UUID to the client
        $id = $this->generator->generate($this->entityManager, $client);
        $client->setIdentifier($id);

        return $client;
    }
public function createClient ( $ name , $ redirect , array $ scopes , $ key , $ secret ) { $ client = $ this -> app -> make ( Client :: class ) ; $ client -> setName ( $ name ) ; $ client -> setRedirectUri ( $ redirect ) ; // @TODO support scopes //$client->setScopes($scopes); $ client -> setClientKey ( $ key ) ; $ client -> setClientSecret ( $ secret ) ; // Apply a new UUID to the client $ id = $ this -> generator -> generate ( $ this -> entityManager , $ client ) ; $ client -> setIdentifier ( $ id ) ; return $ client ; }
Create a new OAuth client object and provide it a proper UUID

@param string $name The client name
@param string $redirect The redirect url
@param string[] $scopes The scopes this client is allowed to interact with
@param string $key The client's api key
@param string $secret This secret should be properly hashed with something like `password_hash`
@return \Concrete\Core\Entity\OAuth\Client
Create a new OAuth client object and provide it a proper UUID