带有Rails的单用户OpenID服务器(Single-user OpenID server with Rails)

我的网站的根页面会自动通过http标头将所有用户重定向到某个子页面。

http://example.com/ → http://example.com/subpage

我想将我的域example.com用作OpenID。 问题是我必须在我的根页面添加一些标记,但它应该重定向子页面上的所有用户。 我可以更改重定向的类型并使用例如元标记。 但有没有更好的方法来实现它,不要打破即时http重定向?

也许我可以以某种方式区分OpenID请求,只有那个时间用html响应?


My website's root page automatically redirects all users to some subpage via http header.

http://example.com/ → http://example.com/subpage

I want to use my domain example.com as OpenID. The problem is that I have to add some tag to my root page, but it should redirect all users on subpage. I can change the type of redirection and use e.g. meta tag. But is there a better way to implement that and don't break instant http redirect?

Maybe I can somehow distinguish OpenID request and only that time respond with html?


原文:https://stackoverflow.com/questions/3588430
2024-04-23 14:04

满意答案

javascript,css文件放在哪里? src / main / webapp / css src / main / webapp / js

什么是顶级src? 是的,src / main / java src / main / resources src / test / java src / test / resources

我建议你使用Maven项目类型。 在Eclipse中:New> Project ...> Maven> Maven Project


Where would javascript,css files be place? src/main/webapp/css src/main/webapp/js

What is top level src normally for? yes, src/main/java src/main/resources src/test/java src/test/resources

I suggest you use a Maven project type. In Eclipse: New > Project... > Maven > Maven Project

相关问答

更多

eclipse中的tomcat 7项目(tomcat 7 project from eclipse)

我找到了以下解决方案: 在日志文件中我们可以看到: Unsupported major.minor version 52.0 正如我们在这里可以看到的: 不受支持的major.minor版本52.0 这是因为我的eclipse在Java 1.8中编译我的项目,而我的tomcat在1.7中运行。 即使我在Eclipse下修改了我的项目构建路径和编译器1.7(+ clean和rebuild)。 所以我只是将我的Tomcat java版本从1.7更改为1.8,现在一切正常。 I found the f...

eclipse中的Tomcat服务器不适用于Gradle构建项目(Tomcat server within eclipse not working for Gradle build project)

将Source配置为/WebContent并在部署中部署Path /在项目属性中的程序集为我启动了tomcat服务器。 Configuring Source as /WebContent and Deploy Path / in Deployment Assembly in project properties started the tomcat server for me.

使用Java EE和Tomcat在eclipse中设置动态Web项目的问题(Problems setting up a dynamic web project in eclipse using Java EE and Tomcat)

我使用命令mvn archetype:generate ...创建了一个maven项目mvn archetype:generate ...以生成我然后导入到Eclipse中的项目结构。 然后,我为该项目添加了一个动态网页小平面。 你不应该添加任何方面,如果你的项目有一个打包类型的战争的东西应该工作。 因此,提供用于使用原型插件创建项目的完整命令是很好的。 你用过maven-archetype-webapp原型吗? 你是否跑过这样的东西: mvn archetype:generate -Darche...

eclipse中tomcat项目的目录结构(Directory structure of tomcat project in eclipse)

javascript,css文件放在哪里? src / main / webapp / css src / main / webapp / js 什么是顶级src? 是的,src / main / java src / main / resources src / test / java src / test / resources 我建议你使用Maven项目类型。 在Eclipse中:New> Project ...> Maven> Maven Project Where would javas...

Eclipse中Dynamic Web Project中的Servlet目录结构实现(Servlet directory structure realization in Dynamic Web Project in Eclipse)

我想,你正在使用注释配置,它不需要与web.xml进行任何映射 您的servlet url模式如下所示: @WebServlet(name = "someThing", urlPatterns = {"/Hello"}) Servlet 3.0的这一新功能使您可以将servlet Hello映射到Web App firstServlet 。 I guess that, you are using annotation configuration which does not need any m...

在eclipse Dynamic Web Project中映射tomcat安装外部的外部目录(Map external directory outside tomcat installation in eclipse Dynamic Web Project)

尝试链接的资源。 转到要在其中显示外部目录的文件夹。 现在打开文件菜单 - >新建 - >文件夹。 输入名称。 点击“高级>>”。 选择“链接到备用位置(链接文件夹)”。 浏览到外部目录。 单击完成。 这将创建从工作区到外部目录的链接。 该插件可能支持该功能。 Try a linked resource. Go to the folder in which you want your external directory to apprear. Now open the File menu -> ...

相关文章

更多

配置sunspot tomcat结合sunspot_rails

1,sudo apt-get install openjdk-6-jdk 2,sudo apt-get ...

微信公共服务平台开发(.Net 的实现)11-------客服消息(定项消息推送 重要的OPENID)

这次我们来一起研究一下“客服消息”,首先明确一下“客服消息”的概念。这不同于之前的“被动响应消息”,也 ...

rails 单元测试

rails 如何保证每次单元测试都清理上一个测试的数据。

rails3+mongrel1.2.0pre2在windows下面的生产环境配置问题

因为公司遗留系统的问题,只能用Windows,也不想装虚拟机。 目前碰到的问题是mongrel不能启 ...

Rails常用插件

测试驱动 rspec-rails:BDD测试框架 初始化:rails generate ...

Rails 风格指导

感谢译者。 本页用于介绍 Ruby 社区首推的Rails代码编写风格,翻译来自:https://git ...

微信-网页授权获取用户openid

第一步:用户同意授权,获取code 在确保微信公众账号拥有授权作用域(scope参数)的权限的前提下( ...

(转)微信Openid和fakeid对应简单实现

好久没有写日志了,最近一直在微信公众平台5.0出来以后才拿到appid,下手比较晚很多功能没有赶上。微 ...

Rails中的路由功能是如何对应的?

我才开始接触ROR,我是参照agile web development with rails这本书学习 ...

微信获取用户的openid和详细信息

获取用户的信息的原理,首先用户会点击一个url,这个url会包含一个参数redirect_uri,这个 ...

最新问答

更多

python的访问器方法有哪些

使用方法: class A(object): def foo(self,x): #类实例方法 print "executing foo(%s,%s)"%(self,x) @classmethod def class_foo(cls,x): #类方法 print "executing class_foo(%s,%s)"%(cls,x) @staticmethod def static_foo(x): #静态方法 print "executing static_foo(%s)"%x调用方法: a =

使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)

我认为你必须将两个TableGetway传递给UserTable构造。 你必须改变Module.php看看: public function getServiceConfig() { return array( 'factories' => array( 'User\Model\UserTable' => function($sm) { $userTableGateway = $sm->get('UserTable

透明度错误IE11(Transparency bug IE11)

这是一个渲染错误,由使用透明度触发,使用bootstrap用于在聚焦控件周围放置蓝色光环的box-shadow属性。 可以通过添加以下类覆盖来解决它。 .form-control:hover { -webkit-box-shadow: 0px 0px 5px 0px rgba(0,0,255,1); -moz-box-shadow: 0px 0px 5px 0px rgba(0,0,255,1); box-shadow: 0px 0px 4px 0px rgba(0,0,255,1)

linux的基本操作命令。。。

ls 显示目录 mkdir 建立目录 cd 进入目录

响应navi重叠h1和nav上的h1链接不起作用(Responsive navi overlaps h1 and navi links on h1 isn't working)

将z-index设置为.main-nav这将解决您的重叠问题 .main-nav { position:relative; z-index:9; } set z-index to .main-nav This will fix your overlaping issue .main-nav { position:relative; z-index:9; }

在C中读取文件:“r”和“a +”标志的不同行为(Reading a File in C: different behavior for “r” and “a+” flags)

这是因为模式规范"a"打开一个文件以便追加,文件指针在末尾。 如果您尝试从此处读取,则由于文件指针位于EOF,因此没有数据。 您应该打开"r+"进行阅读和写作。 如果在写入之前读取整个文件,则在写入更多数据时,文件指针将正确定位以追加。 如果这还不够,请探索ftell()和fseek()函数。 That is because the mode spec "a" opens a file for appending, with the file pointer at the end. If you

NFC提供什么样的带宽?(What Kind of Bandwidth does NFC Provide?)

支持空中接口的数据速率是一回事。 在消除协议开销,等待eeprom写入以及所有需要时间的其他内容之后,您看到的数据速率是完全不同的故事。 长话短说,从标签读取或进行对等传输时的实际数据速率峰值约为2.5千字节/秒。 取决于具体的标签或对等技术,它可能比这慢很多。 The supported data-rates of the air-interface are one thing. The data-rate that you see after removing protocol overhe

元素上的盒子阴影行为(box-shadow behaviour on elements)

它看起来像只在Windows上的Chrome的错误。 我在Google Canary (Chrome 63)中也进行了测试,问题依然存在,所以有可能它不会很快修复。 这个问题是由overflow: auto引起的overflow: auto ,在你的情况下,它可以很容易地通过删除或设置为可见(默认)来解决。 但是 ,将鼠标悬停在右侧(顶部和底部)时,会出现滚动条。 一个解决方案可以设置overflow: hidden的身体,所以预期的结果是所需的。 我想指出,这不是一个很好的解决方案,但我建议暂

Laravel检查是否存在记录(Laravel Checking If a Record Exists)

这取决于您是否要以后与用户合作,或仅检查是否存在。 如果要使用用户对象(如果存在): $user = User::where('email', '=', Input::get('email'))->first(); if ($user === null) { // user doesn't exist } 如果你只想检查 if (User::where('email', '=', Input::get('email'))->count() > 0) { // user found

设置base64图像的大小javascript - angularjs(set size of a base64 image javascript - angularjs)

$scope.getData= function () { var reader = new FileReader(); reader.onload = $('input[type=file]')[0].files; var img = new Image(); img.src =(reader.onload[0].result); img.onload = function() { if(this.width > 640