diff --git a/newscoop/install/Resources/sql/upgrade/4.4.x/2015.02.24/add_client.php b/newscoop/install/Resources/sql/upgrade/4.4.x/2015.02.24/add_client.php index 36b39aaed8..0cedf69cbf 100644 --- a/newscoop/install/Resources/sql/upgrade/4.4.x/2015.02.24/add_client.php +++ b/newscoop/install/Resources/sql/upgrade/4.4.x/2015.02.24/add_client.php @@ -91,7 +91,7 @@ $stmt = $conn->prepare('INSERT INTO OAuthClient(random_id, redirect_uris, secret, allowed_grant_types, name, IdPublication, trusted) VALUES (?, ?, ?, ?, ?, ?, ?)'); $stmt->bindValue(1, Random::generateToken()); - $stmt->bindValue(2, serialize(array($alias.'/oauth/authentication/result'))); + $stmt->bindValue(2, serialize(array('http://'.$alias.'/oauth/authentication/result'))); $stmt->bindValue(3, Random::generateToken()); $stmt->bindValue(4, serialize(array('token', 'authorization_code', 'client_credentials', 'password'))); $stmt->bindValue(5, $defaultClientName); diff --git a/newscoop/library/Newscoop/Tools/Console/Command/CreateOAuthClientCommand.php b/newscoop/library/Newscoop/Tools/Console/Command/CreateOAuthClientCommand.php index ddc8e2b87e..761d14f5a2 100644 --- a/newscoop/library/Newscoop/Tools/Console/Command/CreateOAuthClientCommand.php +++ b/newscoop/library/Newscoop/Tools/Console/Command/CreateOAuthClientCommand.php @@ -26,7 +26,7 @@ protected function configure() ->setName('oauth:create-client') ->setDescription('Create oauth2 client.') ->addArgument('name', InputArgument::REQUIRED, 'Client name') - ->addArgument('publication', InputArgument::REQUIRED, 'Publication alias') + ->addArgument('publication', InputArgument::REQUIRED, 'Publication alias (without http, https and www)') ->addArgument('redirectUris', InputArgument::OPTIONAL, 'Redirect uris') ->addOption('test', null, InputOption::VALUE_NONE, 'If set it will create test client with predefined data (for automatic tests)') ->addOption('default', null, InputOption::VALUE_NONE, 'If set it will create default client with predefined name');