Class: OmniAuth::Facebook::SignedRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/j1_app/omniauth/facebook/signed_request.rb

Defined Under Namespace

Classes: UnknownSignatureAlgorithmError

Constant Summary collapse

SUPPORTED_ALGORITHM =
'HMAC-SHA256'

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value, secret) ⇒ SignedRequest

Returns a new instance of SignedRequest.



15
16
17
18
# File 'lib/j1_app/omniauth/facebook/signed_request.rb', line 15

def initialize(value, secret)
  @value = value
  @secret = secret
end

Instance Attribute Details

#secretObject (readonly)

Returns the value of attribute secret.



9
10
11
# File 'lib/j1_app/omniauth/facebook/signed_request.rb', line 9

def secret
  @secret
end

#valueObject (readonly)

Returns the value of attribute value.



9
10
11
# File 'lib/j1_app/omniauth/facebook/signed_request.rb', line 9

def value
  @value
end

Class Method Details

.parse(value, secret) ⇒ Object



11
12
13
# File 'lib/j1_app/omniauth/facebook/signed_request.rb', line 11

def self.parse(value, secret)
  new(value, secret).payload
end

Instance Method Details

#payloadObject



20
21
22
# File 'lib/j1_app/omniauth/facebook/signed_request.rb', line 20

def payload
  @payload ||= parse_signed_request
end