Identity Server 3 的问题
Problems with Identity Server 3
我们在将 Identity Server 3 放入我们的应用程序时遇到了一些麻烦。
目前我们有一个带有 NHibernate 的 WebApi 来连接到我们的 Oracle 数据库。
我们在前端使用 angularjs,并使用 ajax 调用控制器方法。
一位老同事在他制作的一个应用程序上使用了身份服务器,但是,他配置身份服务器以获取 Windows 凭据(因为我们在公司 AD 中),但最近我们正在制作一个外部网站,将有一个登录名和密码,我们想使用身份服务器作为我们的身份验证和授权。
我查看了他们 github 和其他文章(如 this one)中的示例,但我无法连接到 IS3 进行身份验证,这会给我一个 403.14 错误.
构建和 运行 没有错误,但我似乎无法访问 Identity Server 3。
这是启动
public void Configuration(IAppBuilder app)
{
try
{
app.Map("/identity", idsrvApp =>
{
idsrvApp.UseIdentityServer(new IdentityServerOptions
{
SiteName = "Identity Server",
EnableWelcomePage = false,
RequireSsl = false,
IssuerUri = string.Format("{0}", ConfigurationManager.AppSettings["IdServerEndPoint"]),
SigningCertificate = Certificate.Load(),
Factory = Factory.Configure("MyConStr")
});
});
}
catch (System.Exception ex)
{
LogCore.LogError(ex);
}
}
将此添加到您的 IdentityServerOptions。
LoggingOptions = new LoggingOptions
{
EnableWebApiDiagnostics = true,
WebApiDiagnosticsIsVerbose = true,
EnableHttpLogging = true,
EnableKatanaLogging = true
}
您应该会看到大量非常有价值的调试信息。这通常会告诉我我做错了什么。如果您没有看到输出中的日志记录,请查看 https://identityserver.github.io/Documentation/docsv2/configuration/logging.html
我们在将 Identity Server 3 放入我们的应用程序时遇到了一些麻烦。
目前我们有一个带有 NHibernate 的 WebApi 来连接到我们的 Oracle 数据库。 我们在前端使用 angularjs,并使用 ajax 调用控制器方法。 一位老同事在他制作的一个应用程序上使用了身份服务器,但是,他配置身份服务器以获取 Windows 凭据(因为我们在公司 AD 中),但最近我们正在制作一个外部网站,将有一个登录名和密码,我们想使用身份服务器作为我们的身份验证和授权。
我查看了他们 github 和其他文章(如 this one)中的示例,但我无法连接到 IS3 进行身份验证,这会给我一个 403.14 错误.
构建和 运行 没有错误,但我似乎无法访问 Identity Server 3。
这是启动
public void Configuration(IAppBuilder app)
{
try
{
app.Map("/identity", idsrvApp =>
{
idsrvApp.UseIdentityServer(new IdentityServerOptions
{
SiteName = "Identity Server",
EnableWelcomePage = false,
RequireSsl = false,
IssuerUri = string.Format("{0}", ConfigurationManager.AppSettings["IdServerEndPoint"]),
SigningCertificate = Certificate.Load(),
Factory = Factory.Configure("MyConStr")
});
});
}
catch (System.Exception ex)
{
LogCore.LogError(ex);
}
}
将此添加到您的 IdentityServerOptions。
LoggingOptions = new LoggingOptions
{
EnableWebApiDiagnostics = true,
WebApiDiagnosticsIsVerbose = true,
EnableHttpLogging = true,
EnableKatanaLogging = true
}
您应该会看到大量非常有价值的调试信息。这通常会告诉我我做错了什么。如果您没有看到输出中的日志记录,请查看 https://identityserver.github.io/Documentation/docsv2/configuration/logging.html