Class: Weibo2::Strategy::SignedRequest
- Inherits:
-
OAuth2::Strategy::Base
- Object
- OAuth2::Strategy::Base
- Weibo2::Strategy::SignedRequest
- Defined in:
- lib/weibo2/strategy/signed_request.rb
Instance Attribute Summary collapse
-
#unsigned_request ⇒ Object
readonly
Returns the value of attribute unsigned_request.
Instance Method Summary collapse
-
#authorize_url ⇒ Object
Not used for this strategy.
-
#get_token(signed_request) ⇒ Object
Retrieve an access token given the specified signed_request.
Instance Attribute Details
#unsigned_request ⇒ Object (readonly)
Returns the value of attribute unsigned_request.
4 5 6 |
# File 'lib/weibo2/strategy/signed_request.rb', line 4 def unsigned_request @unsigned_request end |
Instance Method Details
#authorize_url ⇒ Object
Not used for this strategy
9 10 11 |
# File 'lib/weibo2/strategy/signed_request.rb', line 9 def raise NotImplementedError, "The authorization endpoint is not used in this strategy" end |
#get_token(signed_request) ⇒ Object
Retrieve an access token given the specified signed_request.
16 17 18 19 20 21 22 |
# File 'lib/weibo2/strategy/signed_request.rb', line 16 def get_token(signed_request) data = parse_signed_request(signed_request) unless ["-1", "-2"].include? data @unsigned_request = data @client.get_token_from_hash(data) end end |