fix native auth flow

This commit is contained in:
Nicolas Le Goff
2012-04-13 15:47:29 +02:00
parent e513a75d86
commit 636f6dc21d
2 changed files with 4 additions and 4 deletions

View File

@@ -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;

View File

@@ -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 &agrave 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>