为Identityserver3禁用SSL

编程入门 行业动态 更新时间:2024-10-19 21:26:12
本文介绍了为Identityserver3禁用SSL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

使用此框架的新手.

我有一个OAuth客户端,并且正在运行IdentityServer3控制台应用程序.

I have an OAuth client and I am running IdentityServer3 console app.

我收到一个错误消息,说需要SSL.

I get an error to my client saying SSL is required.

是否有一种方法可以(暂时)从IdentityServer3禁用SSL,以便我可以开发/编码/测试我的东西.

Is there a way to disable the SSL from IdentityServer3 (temporarily) so i can develop/code/test my stuff.

这将非常方便,因为其他开发人员也正在为此进行工作.

It would be handy as other developers are working on this as well.

我已将https的基点更改为http,但是仍然需要SSL错误.

I have changed the base-points fro https to http but still SSL required error.

谢谢

这是我的服务器代码":

this is my 'server code':

private static string ServerURL = "localhost:44335"; static void Main(string[] args) { System.Console.Title = "IdentityServer3"; Log.Logger = new LoggerConfiguration() .MinimumLevel.Debug() .WriteTo.LiterateConsole() .CreateLogger(); var webApp = WebApp.Start( ServerURL, app => { app.UseIdentityServer(); }); System.Console.WriteLine("identityserver up and running...."); while(true) { var key = System.Console.ReadKey(true); if (key.Key == ConsoleKey.B) { Process.Start(ServerURL + "/core"); } else { break; } } webApp.Dispose(); }

推荐答案

在options类上将'RequireSsl'设置为false.

Set 'RequireSsl' to false on the options class.

请参见 https ://github/IdentityServer/IdentityServer3.Samples/blob/c0f147c4f481fe77244ef4a2d5e006a4a4366c41/source/Simplest%20OAuth2%20Walkthrough/IdSrv/Startup.cs#L17

作为示例.

更多推荐

为Identityserver3禁用SSL

本文发布于:2023-11-17 02:05:04,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1608408.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:SSL

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!