class StytchB2B::Impersonation

def authenticate(

The type of this field is nilable +String+.
(no documentation yet)
intermediate_session_token_expires_at::
The type of this field is nilable +MfaRequired+ (+object+).
MFA will not be required when authenticating impersonation tokens.
mfa_required::
The type of this field is nilable +MemberSession+ (+object+).
The [Session object](https://stytch.com/docs/b2b/api/session-object) for the impersonated Member.
member_session::
The type of this field is +Integer+.
The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
status_code::
The type of this field is +Boolean+.
The member will always be fully authenticated if an impersonation token is successfully authenticated.
member_authenticated::
The type of this field is +String+.
Successfully authenticating an impersonation token will never result in an intermediate session. If the token is valid, a full session will be created.
intermediate_session_token::
The type of this field is +Organization+ (+object+).
The [Organization object](https://stytch.com/docs/b2b/api/organization-object).
organization::
The type of this field is +String+.
The JSON Web Token (JWT) for a given Stytch Session.
session_jwt::
The type of this field is +String+.
A secret token for a given Stytch Session.
session_token::
The type of this field is +Member+ (+object+).
The [Member object](https://stytch.com/docs/b2b/api/member-object)
member::
The type of this field is +String+.
Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value.
organization_id::
The type of this field is +String+.
Globally unique UUID that identifies a specific Member.
member_id::
The type of this field is +String+.
Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.
request_id::
An object with the following fields:
== Returns:

The type of this field is +String+.
The Member Impersonation token to authenticate. Expires in 5 minutes by default.
impersonation_token::
== Parameters:

Prior to this step, you can generate an impersonation token by visiting the Stytch Dashboard, viewing a member, and clicking the `Impersonate Member` button.

A Stytch session will be created for the impersonated member with a 60 minute duration. Impersonated sessions cannot be extended.
Authenticate an impersonation token to impersonate a Member. This endpoint requires an impersonation token that is not expired or previously used.
def authenticate(
  impersonation_token:
)
  headers = {}
  request = {
    impersonation_token: impersonation_token
  }
  post_request('/v1/b2b/impersonation/authenticate', request, headers)
end

def initialize(connection)

def initialize(connection)
  @connection = connection
end