mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 06:53:15 +00:00
add grant_type password for oauth2Client, handle trusted client such as Phraseanet Navigator
This commit is contained in:
@@ -245,7 +245,7 @@ class API_OAuth2_Adapter extends OAuth2
|
||||
, 'usr_id' => $token->get_account()->get_user()->get_id()
|
||||
, 'oauth_token' => $token->get_value()
|
||||
);
|
||||
|
||||
|
||||
} catch (Exception $e) {
|
||||
|
||||
}
|
||||
|
@@ -147,8 +147,8 @@ class API_OAuth2_Application
|
||||
$stmt->execute(array(':application_id' => $this->id));
|
||||
$row = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
$stmt->closeCursor();
|
||||
|
||||
$this->creator = User_Adapter::getInstance($row['creator'], $this->appbox);
|
||||
$this->creator = !$row['creator'] ? null :
|
||||
User_Adapter::getInstance($row['creator'], $this->appbox);
|
||||
$this->type = $row['type'];
|
||||
$this->name = $row['name'];
|
||||
$this->description = $row['description'];
|
||||
|
24
lib/classes/API/OAuth2/Application/Navigator.class.php
Normal file
24
lib/classes/API/OAuth2/Application/Navigator.class.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Phraseanet
|
||||
*
|
||||
* (c) 2005-2010 Alchemy
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @package
|
||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||
* @link www.phraseanet.com
|
||||
*/
|
||||
|
||||
class API_OAuth2_Application_Navigator
|
||||
{
|
||||
const CLIENT_ID = '\alchemy\phraseanet\id\4f981093aebb66.06844599';
|
||||
const CLIENT_SECRET = '\alchemy\phraseanet\secret\4f9810d4b09799.51622662';
|
||||
const CLIENT_NAME = 'phraseanet-navigator';
|
||||
}
|
Reference in New Issue
Block a user