Parent

Files

Class/Module Index [+]

Quicksearch

Rots::IdentityPageApp

Public Class Methods

new(config, server_options) click to toggle source
# File lib/rots/identity_page_app.rb, line 8
def initialize(config, server_options)
  @server_options = server_options
  @config = config
end

Public Instance Methods

call(env) click to toggle source
# File lib/rots/identity_page_app.rb, line 13
def call(env)
  @request = Rack::Request.new(env)
  Rack::Response.new do |response|
    response.write <html>  <head>  <link rel="openid2.provider" href="#{op_endpoint}" />  <link rel="openid.server" href="#{op_endpoint}" />  </head>  <body>    <h1>This is #{@config['identity']} identity page</h1>  </body></html>
  end.finish
end
op_endpoint() click to toggle source
# File lib/rots/identity_page_app.rb, line 30
def op_endpoint
  "http://%s:%d/server/%s" % [@request.host, 
                         @request.port, 
                         (@request.params['openid.success'] ? '?openid.success=true' : '')]
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.