2016-12-27 8 views
2

パーStormpath documentationは、パスワードgrant_typeのために、1がする必要があるでしょう、すべては以下のようなポストの要求を行うことである。Stormpath OAuth 2.0のサポートされていない許可タイプ

POST /oauth/token 
Host: myapi.com 
Accept: application/json 
Content-Type: application/x-www-form-urlencoded 

grant_type=password 
&[email protected] 
&password=theirPassword 

しかし、これは動作しないと戻って「unsupported_grant_type」 。私の設定では、パスワードの許可が有効になっています。私は何が欠けていますか?ボディは、OAuth2.0の規格ごとのような単一の行でなければなりません -

答えて

2

はそれを考え出し、リクエストボディは、これが正しい1行に

grant_type=password&[email protected]&password=theirPassword 
+2

でなければなりませんでした。 – rdegges

+0

@rdeggesドキュメントを更新していただきありがとうございます! –

+0

これは正しい答えです! .NETのドキュメントを更新しました:https://docs.stormpath.com/dotnet/aspnet/latest/authentication.html#oauth2-password-grant –

関連する問題