1
以下はうまくいきます。私は後続のリクエストで使用できるアクセストークンを取得します。私はVUE-リソースを使用してデュに同じことをしようとすると、エンドポイントは戻ってきます401
curl localhost:8080/oauth/token --user html5:password -d grant_type=password -d username=name -d password=pass
は、しかし、私は401
const options = {
headers: {
Authorization: 'Basic ' + window.btoa('html5:password')
},
params: {
'client_id': 'html5',
'client_secret': 'password',
'grant_type': 'password',
'username': 'name',
'password': 'pass'
}
}
context.$http.post(LOGIN_URL, options).then((response) => {
localStorage.setItem(this.storageKey, response.access_token)
// TODO: Check 200 ok
this.user.authenticated = true
if (redirect) {
Router.go(redirect)
}
})
私が間違ってやっているかについての任意の手掛かりを得ますか?
ブラウザの[ネットワーク]タブの意味 - 送信したデータは、まるでカールしたものと同じですか? –
実際には... https://imgur.com/a/RaeFG – user672009