首页 \ 问答 \ 将IdentityServer3与独立的EXE结合使用(不使用'redirect_uri'?)(Using IdentityServer3 with a standalone EXE (without using 'redirect_uri'?))

将IdentityServer3与独立的EXE结合使用(不使用'redirect_uri'?)(Using IdentityServer3 with a standalone EXE (without using 'redirect_uri'?))

我有一个我正在开发的Web站点,它使用IdentityServer3进行身份验证,并且它还会返回一个访问令牌来启用对我的API的访问。 一切运作良好。 我现在正在将网站改写为独立的Windows EXE。 EXE是用React和Electron编写的,使它成为一个独立的应用程序。 我的问题是:我将'授权'端点称为我的identityserver3服务器,但我不知道要为Identityserver3所需的'redirect_uri'放置什么内容? 由于我的EXE是独立的,它没有uri地址?

有没有办法使用IdentityServer3作为API,在那里我可以发送'授权'url到IdentityServer3,并让它返回访问令牌作为响应(对API调用?)


I have a web site I'm developing that uses IdentityServer3 to authentication with, and it also returns an access token to enable access to my APIs. All works well. I'm now rewriting the web site into a standalone windows EXE. The EXE is written in React and Electron to make it a standalone application. My problem is: I call the 'authorize' endpoint to my identityserver3 server, but I do not know what to put in for the 'redirect_uri' required by identityserver3? Since my EXE is standalone it has no uri address?

Is there a way to use IdentityServer3 as an API, where I can send the 'authorize' url to IdentityServer3, and have it return the access token as a response (to the API call?)


原文:https://stackoverflow.com/questions/48080523
更新时间:2022-12-12 18:12

最满意答案

随机数是用于防止浏览器缓存的时间戳。 如果这不是您想要的,请在ajax调用中添加cache : true选项。 例如: $.ajax({url: "url", success: callback, cache: true}); 。 如果你想要防止所有未来的AJAX请求被默认缓存(这实际上是jQuery中的默认设置):

$(document).ready(function() {
  $.ajaxSetup({ cache: true });
});

Random number is timestamp which is used to prevent browser's cache. If that's not what you want, add cache : true option in ajax call. For example: $.ajax({url: "url", success: callback, cache: true});. If you want to prevent all future AJAX requests from being cached by default(this is actually the default setting in jQuery):

$(document).ready(function() {
  $.ajaxSetup({ cache: true });
});

相关问答

更多
  • 随机数是用于防止浏览器缓存的时间戳。 如果这不是您想要的,请在ajax调用中添加cache : true选项。 例如: $.ajax({url: "url", success: callback, cache: true}); 。 如果你想要防止所有未来的AJAX请求被默认缓存(这实际上是jQuery中的默认设置): $(document).ready(function() { $.ajaxSetup({ cache: true }); }); Random number is timestamp w ...
  • 它不会像文本一样执行。 您必须在响应文本上使用"eval"功能 It will not be execute as it comes as text. You have to use "eval" function on your response text
  • 请求后调用您的函数: $("#chat_main").load("chat", { ajax: 1 //here we trying to load back main page }).done(onload); // <-- 如果.load没有产生承诺使用: $("#chat_main").load("chat", { ajax: 1 //here we trying to load back main page }, onload); // <-- Call your functio ...
  • 在selenium中没有内置机制来检测ajax请求。 Selenium 2在路线图中有这个。 在selenium中添加waitForcondition 。 selenium.browserbot.getUserWindow().$.active== 0 注意:如果您的页面使用jquery,则此方法有效。 对于其他框架......有不同的方法用其他东西替换$ .active。 There is no inbuilt mechanism in selenium to detect ajax requests. ...
  • 我的解决方案非常简单。 我们的想法是不要在文档准备就绪时调用您的自定义代码。 相反,将它们全部包装到jQuery函数中,然后在文档就绪和page:done中调用此函数。 // You custom code $.fn.my_app_init = function() { console.log('AVF'); //... $('#toggle-sizes').click(function(){ //... }; $(document).ready(function() { $(document ...
  • var element = document.createElement("iframe"); document.body.appendChild(element); var frame = window.frames[windows.frames.length - 1]; frame.document.write('
    将元素的innerHTML属性设置为包含