私はAuthorizationのためにIdentityServer4を使用するAngularJSアプリケーションを実装しています。AngularJS - IdentityServer4.Quickstart.UI - 'AuthenticationProperties'はあいまいな参照です
私は、.netコアアプリケーションのapiコントローラを呼び出す.Net Core 2.0アプリケーション内に、スタンドアローンの角度アプリを持っています。私がhttp://localhost:5050/.well-known/openid-configuration
を参照すると、私はjsonを返すようになっています。
私は私の認証サービスのための基礎としてthis例を使用している:callback.html
で
function authService() {
var config = {
authority: "http://localhost:5050",
client_id: "js",
redirect_uri: "http://localhost:5050/LocalizationAdmin/callback.html",
response_type: "id_token token",
scope: "openid profile api1",
post_logout_redirect_uri: "http://localhost:5050/LocalizationAdmin/index.html"
};
var mgr = new Oidc.UserManager(config);
mgr.getUser().then(function (user) {
if (user) {
log("User logged in", user.profile);
} else {
log("User not logged in");
}
});
var service = {
login: login,
logout: logout,
};
return service;
function login() {
mgr.signinRedirect();
}
私が追加しました:
http://localhost:5050/account/login?returnUrl=%2Fconnect%2Fauthorize%2Fcallback%3Fclient_id%3Djs%26redirect_uri%3Dhttp%253A%252F%252Flocalhost%253A5050%252FLocalizationAdmin%252Fcallback.html%26response_type%3Did_token%2520token%26scope%3Dopenid%2520profile%2520api1%26state%3Dd526351a26f74202badb7685022a6549%26nonce%3D6c858921378645ca8fcad973eb26cc72
:
<body>
<script src="scripts/oidc-client.js"></script>
<script>
new Oidc.UserManager().signinRedirectCallback().then(function() {
window.location = "index.html";
}).catch(function (e) {
console.error(e);
});
</script>
</body>
をそれにリダイレクトしようとしています
しかし、私はそれをIdentityServer4ログイン・スクールにリダイレクトしたいだけですeen。どうすればこれを達成できますか?どんな助けもありがたい。
編集:私はここからUIテンプレートを追加した
:私はネットコア2.0を使用していますので、
https://github.com/IdentityServer/IdentityServer4.Quickstart.UI
しかし、私はエラーの数を取得していますが、これは可能性がバージョン:assemblyref://IdentityServer4 (2.0.0-rc1-update1)
Error CS0104 'AuthenticationProperties' is an ambiguous reference between 'Microsoft.AspNetCore.Authentication.AuthenticationProperties' and 'Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties'
github hereに問題を示すデモプロジェクトが表示されます。
ありがとうございますが、UIの追加については何もありません。 –