0
我正在使用Thinktecture IdentitiyServer V3作爲OpenIdConnect提供商進行身份驗證。我有一個自定義用戶服務,可以根據Active Directory對用戶進行身份驗證。我想發送一些配置文件數據到RP。身份驗證正在成功進行,但我不確定如何配置RP以檢索配置文件數據。來自OpenIdConnect提供商的配置文件數據 - Thinktecture IdentityServer V3
我的用戶服務實現GetProfileDataAsync方法來獲取所需的數據與我目前的配置此方法永遠不會被擊中。
我是OpenIdConnect的新手。請幫忙。從Startup.cs
我的RP配置:
app.UseCookieAuthentication(new CookieAuthenticationOptions()
{
AuthenticationType = "Cookies"
});
app.UseOpenIdConnectAuthentication(new OpenIdConnectAuthenticationOptions()
{
Authority = "url",
ClientId = "owinmvc",
Scope = "openid profile",
ResponseType = "id_token token",
RedirectUri = "https://localhost:44307/",
SignInAsAuthenticationType = "Cookies",
Notifications = new OpenIdConnectAuthenticationNotifications()
{
SecurityTokenValidated = (context) =>
{
var identity = context.AuthenticationTicket.Identity;
identity.AddClaim(new Claim("CustomRoleClaim", "This is a role"));
return Task.FromResult(0);
}
}
});
是的..我能解決這個問題,但我沒有更新的問題。我做了兩個改變。我將Addess電子郵件發送到我的範圍並將AlwaysIncludeInToken設置爲True。 – user3731783