0
當訪問jhipster的oauth2 API在我離子應用但我沒有得到響應。這是$ HTTP請求我從我的應用程序離子發送訪問jhipster的oauth2離子應用驗證REST API
$http({
method: "post",
url: "http://192.168.0.5:8080/auth-2-sconnect/oauth/token",
data: "username=admin&password=admin&grant_type=password&scope=read write&client_secret=my-secret-token-to-change-in-production&client_id=auth2Sconnectapp",
withCredentials: true,
headers: {
'Accept':'application/json',
'Content-Type': 'application/x-www-form-urlencoded'
}
})
.success(function(data) {
alert("success: " + data);
})
.error(function(data, status) {
alert("ERROR: " + data);
});
這也給** Status Code:403 Forbidden**
錯誤,如果我插入
'Authorization': 'Basic ' + 'YXV0aDJTY29ubmVjdGFwcDpteS1zZWNyZXQtdG9rZW4tdG8tY2hhbmdlLWluLXByb2R1Y3Rpb24='
內頭
您是否檢查代理? – mattymanme
JYSTER應用程序和離子應用程序都在我的本地機器上運行 – abhi314
您是否嘗試使用此URL? 'url:「http:// localhost:8080/auth-2-sconnect/oauth/token」,' – mattymanme