Top Level Namespace

Defined Under Namespace

Modules: MojeIDAttributes Classes: MojeID

Instance Method Summary collapse

Instance Method Details

#xrds_meta_tag(request) ⇒ Object

helper methods



3
4
5
# File 'lib/helpers.rb', line 3

def xrds_meta_tag(request)
  tag :meta, :'http-equiv' => "x-xrds-location", :content => "#{request.protocol}#{request.host_with_port}/xrds.xml"
end

#xrds_response(return_url) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/helpers.rb', line 7

def xrds_response(return_url)
  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<xrds:XRDS xmlns:xrds=\"xri://$xrds\" xmlns=\"xri://$xrd*($v*2.0)\">
   <XRD>
     <Service>
       <Type>http://specs.openid.net/auth/2.0/return_to</Type>
       <URI>#{return_url}</URI>
     </Service>
   </XRD>
</xrds:XRDS>"
end