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