Class: Seam::Resources::ClientSession

Inherits:
BaseResource show all
Defined in:
lib/seam/resources/client_session.rb

Overview

Represents a client session. If you want to restrict your users' access to their own devices, use client sessions.

You create each client session with a custom user_identifier_key. Normally, the user_identifier_key is a user ID that your application provides.

When calling the Seam API from your backend using an API key, you can pass the user_identifier_key as a parameter to limit results to the associated client session. For example, /devices/list?user_identifier_key=123 only returns devices associated with the client session created with the user_identifier_key 123.

A client session has a token that you can use with the Seam JavaScript SDK to make requests from the client (browser) directly to the Seam API. The token restricts the user's access to only the devices that they own.

See also Get Started with React.

Instance Attribute Summary collapse

Attributes inherited from BaseResource

#client, #data

Method Summary

Methods inherited from BaseResource

date_accessor, #initialize, #inspect, load_from_response, #update_from_response

Constructor Details

This class inherits a constructor from Seam::Resources::BaseResource

Instance Attribute Details

#client_session_idObject

ID of the client session.



16
17
18
# File 'lib/seam/resources/client_session.rb', line 16

def client_session_id
  @client_session_id
end

#connect_webview_idsObject

IDs of the Connect Webviews associated with the client session.



18
19
20
# File 'lib/seam/resources/client_session.rb', line 18

def connect_webview_ids
  @connect_webview_ids
end

#connected_account_idsObject

IDs of the connected accounts associated with the client session.



20
21
22
# File 'lib/seam/resources/client_session.rb', line 20

def 
  @connected_account_ids
end

#customer_keyObject

Customer key associated with the client session.



22
23
24
# File 'lib/seam/resources/client_session.rb', line 22

def customer_key
  @customer_key
end

#device_countObject

Number of devices associated with the client session.



24
25
26
# File 'lib/seam/resources/client_session.rb', line 24

def device_count
  @device_count
end

#tokenObject

Client session token associated with the client session.



26
27
28
# File 'lib/seam/resources/client_session.rb', line 26

def token
  @token
end

#user_identifier_keyObject

Your user ID for the user associated with the client session.



28
29
30
# File 'lib/seam/resources/client_session.rb', line 28

def user_identifier_key
  @user_identifier_key
end

#user_identity_idObject

ID of the user identity associated with the client session.



30
31
32
# File 'lib/seam/resources/client_session.rb', line 30

def user_identity_id
  @user_identity_id
end

#user_identity_idsObject

Deprecated.

Use user_identity_id instead.

IDs of the user identities associated with the client session.



33
34
35
# File 'lib/seam/resources/client_session.rb', line 33

def user_identity_ids
  @user_identity_ids
end

#workspace_idObject

ID of the workspace associated with the client session.



35
36
37
# File 'lib/seam/resources/client_session.rb', line 35

def workspace_id
  @workspace_id
end