An OAuth token request, sent from a relying party to a provider
Instantiate a Request object from the arguments in a checkid_* OpenID message return nil if the extension was not requested.
# File lib/openid/extensions/oauth.rb, line 33 def self.from_openid_request(oid_req) oauth_req = new args = oid_req.message.get_args(NS_URI) if args == {} return nil end oauth_req.parse_extension_args(args) return oauth_req end
# File lib/openid/extensions/oauth.rb, line 23 def get_extension_args ns_args = {} ns_args['consumer'] = @consumer if @consumer ns_args['scope'] = @scope if @scope return ns_args end
Set the state of this request to be that expressed in these OAuth arguments
# File lib/openid/extensions/oauth.rb, line 45 def parse_extension_args(args) @consumer = args["consumer"] @scope = args["scope"] end
Generated with the Darkfish Rdoc Generator 2.