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