Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adding a list thing needed on the mock identity page app in order to …

…make it work as expected
  • Loading branch information...
commit e92ce82dba58423eaa610beb8ca1a3a4b76c3983 1 parent 4df24c8
@roman authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/ruby_openid_test_server/mock_identity_page.rb
View
6 lib/ruby_openid_test_server/mock_identity_page.rb
@@ -9,12 +9,14 @@ def initialize(config)
end
def call(env)
+ request = Rack::Request.new(env)
+ flag = request.params['openid.success'] == 'true' ? '?openid.success=true' : ''
Rack::Response.new do |response|
response.write <<-HERE
<html>
<head>
- <link rel="openid.server" href="http://localhost:1123/" />
- <link rel="openid2.provider" href="http://localhost:1123" />
+ <link rel="openid.server" href="http://localhost:1123/#{flag}" />
+ <link rel="openid2.provider" href="http://localhost:1123/#{flag}" />
</head>
<body>
<h1>This is #{@config['identity']} identity page</h1>
Please sign in to comment.
Something went wrong with that request. Please try again.