Class: OpenID::UI::Request
- Defined in:
- lib/openid/extensions/ui.rb
Instance Attribute Summary collapse
-
#icon ⇒ Object
Returns the value of attribute icon.
-
#lang ⇒ Object
Returns the value of attribute lang.
-
#mode ⇒ Object
Returns the value of attribute mode.
-
#ns_alias ⇒ Object
Returns the value of attribute ns_alias.
-
#ns_uri ⇒ Object
Returns the value of attribute ns_uri.
Class Method Summary collapse
-
.from_openid_request(oid_req) ⇒ Object
Instantiate a Request object from the arguments in a checkid_* OpenID message return nil if the extension was not requested.
Instance Method Summary collapse
- #get_extension_args ⇒ Object
-
#initialize(mode = nil, icon = nil, lang = nil) ⇒ Request
constructor
A new instance of Request.
-
#parse_extension_args(args) ⇒ Object
Set UI extension parameters.
Methods inherited from Extension
Constructor Details
Instance Attribute Details
#icon ⇒ Object
Returns the value of attribute icon.
12 13 14 |
# File 'lib/openid/extensions/ui.rb', line 12 def icon @icon end |
#lang ⇒ Object
Returns the value of attribute lang.
12 13 14 |
# File 'lib/openid/extensions/ui.rb', line 12 def lang @lang end |
#mode ⇒ Object
Returns the value of attribute mode.
12 13 14 |
# File 'lib/openid/extensions/ui.rb', line 12 def mode @mode end |
#ns_alias ⇒ Object
Returns the value of attribute ns_alias.
12 13 14 |
# File 'lib/openid/extensions/ui.rb', line 12 def ns_alias @ns_alias end |
#ns_uri ⇒ Object
Returns the value of attribute ns_uri.
12 13 14 |
# File 'lib/openid/extensions/ui.rb', line 12 def ns_uri @ns_uri end |
Class Method Details
.from_openid_request(oid_req) ⇒ Object
Instantiate a Request object from the arguments in a checkid_* OpenID message return nil if the extension was not requested.
32 33 34 35 36 37 38 39 40 |
# File 'lib/openid/extensions/ui.rb', line 32 def self.from_openid_request(oid_req) oauth_req = new args = oid_req..get_args(NS_URI) if args == {} return nil end oauth_req.parse_extension_args(args) return oauth_req end |
Instance Method Details
#get_extension_args ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/openid/extensions/ui.rb', line 21 def get_extension_args ns_args = {} ns_args['lang'] = @lang if @lang ns_args['icon'] = @icon if @icon ns_args['mode'] = @mode if @mode return ns_args end |
#parse_extension_args(args) ⇒ Object
Set UI extension parameters
43 44 45 46 47 |
# File 'lib/openid/extensions/ui.rb', line 43 def parse_extension_args(args) @lang = args["lang"] @icon = args["icon"] @mode = args["mode"] end |