Class: OpenID::Teams::Request
- Inherits:
-
Extension
- Object
- Extension
- OpenID::Teams::Request
- Defined in:
- lib/openid/extensions/teams.rb
Instance Attribute Summary collapse
-
#ns_alias ⇒ Object
Returns the value of attribute ns_alias.
-
#ns_uri ⇒ Object
Returns the value of attribute ns_uri.
-
#teams ⇒ Object
Returns the value of attribute teams.
Class Method Summary collapse
Instance Method Summary collapse
-
#get_extension_args ⇒ Object
Get the string arguments that should be added to an OpenID message for this extension.
-
#initialize(teams) ⇒ Request
constructor
A new instance of Request.
Constructor Details
Instance Attribute Details
#ns_alias ⇒ Object
Returns the value of attribute ns_alias.
22 23 24 |
# File 'lib/openid/extensions/teams.rb', line 22 def ns_alias @ns_alias end |
#ns_uri ⇒ Object
Returns the value of attribute ns_uri.
22 23 24 |
# File 'lib/openid/extensions/teams.rb', line 22 def ns_uri @ns_uri end |
#teams ⇒ Object
Returns the value of attribute teams.
22 23 24 |
# File 'lib/openid/extensions/teams.rb', line 22 def teams @teams end |
Class Method Details
.from_openid_request(request) ⇒ Object
30 31 32 33 34 35 |
# File 'lib/openid/extensions/teams.rb', line 30 def self.from_openid_request(request) args = request..get_args(NS_URI) return nil if {} == args teams = args['query_membership'].split(',') new(teams) end |
Instance Method Details
#get_extension_args ⇒ Object
Get the string arguments that should be added to an OpenID message for this extension.
39 40 41 42 43 |
# File 'lib/openid/extensions/teams.rb', line 39 def get_extension_args args = {} args['query_membership'] = @teams.join(',') unless @teams.empty? return args end |