Class: StytchB2B::Sessions::RevokeRequestOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/stytch/b2b_sessions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(authorization: nil) ⇒ RevokeRequestOptions

Returns a new instance of RevokeRequestOptions.



22
23
24
25
26
# File 'lib/stytch/b2b_sessions.rb', line 22

def initialize(
  authorization: nil
)
  @authorization = authorization
end

Instance Attribute Details

#authorizationObject

Optional authorization object. Pass in an active Stytch Member session token or session JWT and the request will be run using that member’s permissions.



20
21
22
# File 'lib/stytch/b2b_sessions.rb', line 20

def authorization
  @authorization
end

Instance Method Details

#to_headersObject



28
29
30
31
32
# File 'lib/stytch/b2b_sessions.rb', line 28

def to_headers
  headers = {}
  headers.merge!(@authorization.to_headers) if authorization
  headers
end