mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-09 19:13:26 +00:00
fix native auth flow
This commit is contained in:
@@ -597,8 +597,8 @@ class API_OAuth2_Adapter extends OAuth2
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($response_type == OAUTH2_AUTH_RESPONSE_TYPE_AUTH_CODE || $response_type == OAUTH2_AUTH_RESPONSE_TYPE_CODE_AND_TOKEN)
|
||||
$result["token"] = $this->createAccessToken($account_id, $scope);
|
||||
if ($response_type == OAUTH2_AUTH_RESPONSE_TYPE_AUTH_CODE)
|
||||
$result["code"] = $this->createAuthCode($account_id, $redirect_uri, $scope);
|
||||
|
||||
if ($response_type == OAUTH2_AUTH_RESPONSE_TYPE_ACCESS_TOKEN)
|
||||
$result["error"] = OAUTH2_ERROR_UNSUPPORTED_RESPONSE_TYPE;
|
||||
|
@@ -58,7 +58,7 @@
|
||||
{{error}}
|
||||
{% endtrans %}
|
||||
</p>
|
||||
<input type="text" class="input-xlarge" name="access_token" value="{{token.access_token}}" size="{{token.access_token|length}}"/>
|
||||
<input type="text" class="input-xlarge" name="authorize_token" value="{{code}}" size="{{code|length}}"/>
|
||||
</div>
|
||||
{% else %}
|
||||
<div id="top-text-box">
|
||||
@@ -70,7 +70,7 @@
|
||||
Copiez le code ci-dessous, retournez dans votre application et collez-le à l'endroit requis :
|
||||
{% endtrans %}
|
||||
</p>
|
||||
<input type="text" class="input-xlarge" name="access_token" value="{{token.access_token}}" size="{{token.access_token|length}}"/>
|
||||
<input type="text" class="input-xlarge" name="authorize_token" value="{{code}}" size="{{code|length}}"/>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user