Class: Stytch::MethodOptions::Authorization
- Inherits:
-
Object
- Object
- Stytch::MethodOptions::Authorization
- Defined in:
- lib/stytch/method_options.rb
Instance Attribute Summary collapse
-
#session_jwt ⇒ Object
The JSON Web Token (JWT) for a given Stytch Session.
-
#session_token ⇒ Object
A secret token for a given Stytch Session.
Instance Method Summary collapse
-
#initialize(session_token: nil, session_jwt: nil) ⇒ Authorization
constructor
A new instance of Authorization.
- #to_headers ⇒ Object
Constructor Details
#initialize(session_token: nil, session_jwt: nil) ⇒ Authorization
Returns a new instance of Authorization.
9 10 11 12 |
# File 'lib/stytch/method_options.rb', line 9 def initialize(session_token: nil, session_jwt: nil) @session_token = session_token @session_jwt = session_jwt end |
Instance Attribute Details
#session_jwt ⇒ Object
The JSON Web Token (JWT) for a given Stytch Session.
7 8 9 |
# File 'lib/stytch/method_options.rb', line 7 def session_jwt @session_jwt end |
#session_token ⇒ Object
A secret token for a given Stytch Session.
5 6 7 |
# File 'lib/stytch/method_options.rb', line 5 def session_token @session_token end |
Instance Method Details
#to_headers ⇒ Object
14 15 16 17 18 19 |
# File 'lib/stytch/method_options.rb', line 14 def to_headers headers = {} headers['X-Stytch-Member-Session'] = session_token if session_token headers['X-Stytch-Member-SessionJWT'] = session_jwt if session_jwt headers end |