mirror of
https://github.com/samsonjs/simple_oauth.git
synced 2026-04-27 14:57:45 +00:00
making signed attributes public so that it can be used with 3rd party http request libraries to use oauth through query string
This commit is contained in:
parent
e66291245d
commit
c775850614
1 changed files with 4 additions and 4 deletions
|
|
@ -67,15 +67,15 @@ module SimpleOAuth
|
||||||
valid
|
valid
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def signed_attributes
|
||||||
|
attributes.merge(:oauth_signature => signature)
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
def normalized_attributes
|
def normalized_attributes
|
||||||
signed_attributes.sort_by{|k,v| k.to_s }.map{|k,v| %(#{k}="#{self.class.encode(v)}") }.join(', ')
|
signed_attributes.sort_by{|k,v| k.to_s }.map{|k,v| %(#{k}="#{self.class.encode(v)}") }.join(', ')
|
||||||
end
|
end
|
||||||
|
|
||||||
def signed_attributes
|
|
||||||
attributes.merge(:oauth_signature => signature)
|
|
||||||
end
|
|
||||||
|
|
||||||
def attributes
|
def attributes
|
||||||
ATTRIBUTE_KEYS.inject({}){|a,k| options.key?(k) ? a.merge(:"oauth_#{k}" => options[k]) : a }
|
ATTRIBUTE_KEYS.inject({}){|a,k| options.key?(k) ? a.merge(:"oauth_#{k}" => options[k]) : a }
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue