Class: OmniAuth::Facebook::SignedRequest
- Inherits:
-
Object
- Object
- OmniAuth::Facebook::SignedRequest
- Defined in:
- lib/omniauth/facebook/signed_request.rb
Defined Under Namespace
Classes: UnknownSignatureAlgorithmError
Constant Summary collapse
- SUPPORTED_ALGORITHM =
'HMAC-SHA256'
Instance Attribute Summary collapse
-
#secret ⇒ Object
readonly
Returns the value of attribute secret.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(value, secret) ⇒ SignedRequest
constructor
A new instance of SignedRequest.
- #payload ⇒ Object
Constructor Details
#initialize(value, secret) ⇒ SignedRequest
Returns a new instance of SignedRequest.
15 16 17 18 |
# File 'lib/omniauth/facebook/signed_request.rb', line 15 def initialize(value, secret) @value = value @secret = secret end |
Instance Attribute Details
#secret ⇒ Object (readonly)
Returns the value of attribute secret.
9 10 11 |
# File 'lib/omniauth/facebook/signed_request.rb', line 9 def secret @secret end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
9 10 11 |
# File 'lib/omniauth/facebook/signed_request.rb', line 9 def value @value end |
Class Method Details
.parse(value, secret) ⇒ Object
11 12 13 |
# File 'lib/omniauth/facebook/signed_request.rb', line 11 def self.parse(value, secret) new(value, secret).payload end |
Instance Method Details
#payload ⇒ Object
20 21 22 |
# File 'lib/omniauth/facebook/signed_request.rb', line 20 def payload @payload ||= parse_signed_request end |