Class: Files::Session
- Inherits:
-
Object
- Object
- Files::Session
- Defined in:
- lib/files.com/models/session.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Class Method Summary collapse
-
.as_user(params = {}, options = {}) ⇒ Object
Parameters: user_id (required) - string - User id to login as.
-
.create(params = {}, options = {}) ⇒ Object
Parameters: username - string - Username to sign in as password - string - Password for sign in aws_access_key_id - string - AWS Access Key ID for signing in with AWS credentials change_password - string change_password_confirmation - string interface - string ssh_client_identification - string locale - string no_cookie - boolean oauth_provider - string oauth_label - string oauth_code - string oauth_state - string otp - string - If this user has a 2FA device, provide its OTP or code here.
- .delete(params = {}, options = {}) ⇒ Object
- .destroy(params = {}, options = {}) ⇒ Object
-
.forgot(params = {}, options = {}) ⇒ Object
Parameters: email - string username - string username_or_email - string.
-
.forgot_reset(params = {}, options = {}) ⇒ Object
Parameters: code (required) - string password (required) - string confirm_password - string interface - string locale - string otp - string.
-
.forgot_validate(params = {}, options = {}) ⇒ Object
Parameters: code (required) - string.
-
.oauth(params = {}, options = {}) ⇒ Object
Parameters: provider (required) - string label - string state - string host - string.
-
.pairing_key(key, params = {}, options = {}) ⇒ Object
Parameters: key (required) - string - The pairing key to reserve for login.
-
.public_hosting(params = {}, options = {}) ⇒ Object
Parameters: return_to (required) - string - Public Hosting URL to return to after authentication.
-
.subdomain(params = {}, options = {}) ⇒ Object
Parameters: subdomain (required) - string - Site subdomain to login to.
-
.trusted(params = {}, options = {}) ⇒ Object
Parameters: session_id (required) - string - Session ID to convert to a trusted session.
Instance Method Summary collapse
-
#ai_assistant_personality_id ⇒ Object
int64 - AI Assistant Personality ID for the in-app AI Assistant.
- #ai_assistant_personality_id=(value) ⇒ Object
-
#ai_assistant_personality_system_prompt ⇒ Object
string - System prompt for the in-app AI Assistant.
- #ai_assistant_personality_system_prompt=(value) ⇒ Object
-
#allowed_2fa_method_sms ⇒ Object
boolean - Sent only if 2FA setup is needed.
- #allowed_2fa_method_sms=(value) ⇒ Object
-
#allowed_2fa_method_totp ⇒ Object
boolean - Sent only if 2FA setup is needed.
- #allowed_2fa_method_totp=(value) ⇒ Object
-
#allowed_2fa_method_webauthn ⇒ Object
boolean - Sent only if 2FA setup is needed.
- #allowed_2fa_method_webauthn=(value) ⇒ Object
-
#allowed_2fa_method_yubi ⇒ Object
boolean - Sent only if 2FA setup is needed.
- #allowed_2fa_method_yubi=(value) ⇒ Object
-
#aws_access_key_id ⇒ Object
string - AWS Access Key ID for signing in with AWS credentials.
- #aws_access_key_id=(value) ⇒ Object
-
#aws_secret_key ⇒ Object
string - AWS Secret Key for validating AWS-style signatures in the Inbound S3 endpoint.
- #aws_secret_key=(value) ⇒ Object
-
#calculate_file_checksums_crc32 ⇒ Object
boolean - Calculate CRC32 checksum for incoming files?.
- #calculate_file_checksums_crc32=(value) ⇒ Object
-
#calculate_file_checksums_md5 ⇒ Object
boolean - Calculate MD5 checksum for incoming files?.
- #calculate_file_checksums_md5=(value) ⇒ Object
-
#calculate_file_checksums_sha1 ⇒ Object
boolean - Calculate SHA1 checksum for incoming files?.
- #calculate_file_checksums_sha1=(value) ⇒ Object
-
#calculate_file_checksums_sha256 ⇒ Object
boolean - Calculate SHA256 checksum for incoming files?.
- #calculate_file_checksums_sha256=(value) ⇒ Object
-
#change_password ⇒ Object
string.
- #change_password=(value) ⇒ Object
-
#change_password_confirmation ⇒ Object
string.
- #change_password_confirmation=(value) ⇒ Object
-
#default_workspace_id ⇒ Object
int64 - Workspace ID the user should land in by default when more than one Workspace is available.
- #default_workspace_id=(value) ⇒ Object
- #destroy(params = {}, options = {}) ⇒ Object
-
#finalize_partial_uploads ⇒ Object
boolean - Finalize partial SFTP uploads?.
- #finalize_partial_uploads=(value) ⇒ Object
-
#home_path ⇒ Object
string - Initial path to start the user's session in.
- #home_path=(value) ⇒ Object
-
#id ⇒ Object
string - Session ID.
- #id=(value) ⇒ Object
-
#impersonator_user_id ⇒ Object
int64 - User ID of the Site Admin who initiated a Read-Only session impersonating this session's user.
- #impersonator_user_id=(value) ⇒ Object
-
#initialize(attributes = {}, options = {}) ⇒ Session
constructor
A new instance of Session.
-
#interface ⇒ Object
string.
- #interface=(value) ⇒ Object
-
#language ⇒ Object
string - Session language.
- #language=(value) ⇒ Object
-
#legacy_checksums_mode ⇒ Object
boolean - Use legacy checksums mode?.
- #legacy_checksums_mode=(value) ⇒ Object
-
#locale ⇒ Object
string.
- #locale=(value) ⇒ Object
-
#login_token ⇒ Object
string - Login token.
- #login_token=(value) ⇒ Object
-
#login_token_domain ⇒ Object
string - Domain to use with
login_token. - #login_token_domain=(value) ⇒ Object
-
#max_dir_listing_size ⇒ Object
int64 - Maximum number of files to retrieve per folder for a directory listing.
- #max_dir_listing_size=(value) ⇒ Object
-
#multiple_regions ⇒ Object
boolean - Can access multiple regions?.
- #multiple_regions=(value) ⇒ Object
-
#no_cookie ⇒ Object
boolean.
- #no_cookie=(value) ⇒ Object
-
#oauth_code ⇒ Object
string.
- #oauth_code=(value) ⇒ Object
-
#oauth_label ⇒ Object
string.
- #oauth_label=(value) ⇒ Object
-
#oauth_provider ⇒ Object
string.
- #oauth_provider=(value) ⇒ Object
-
#oauth_state ⇒ Object
string.
- #oauth_state=(value) ⇒ Object
-
#otp ⇒ Object
string - If this user has a 2FA device, provide its OTP or code here.
- #otp=(value) ⇒ Object
-
#partial_session_id ⇒ Object
string - Identifier for a partially-completed login.
- #partial_session_id=(value) ⇒ Object
-
#password ⇒ Object
string - Password for sign in.
- #password=(value) ⇒ Object
-
#read_only ⇒ Object
boolean - Is this session read only?.
- #read_only=(value) ⇒ Object
-
#root_path ⇒ Object
string - Root path to restrict the user's session to.
- #root_path=(value) ⇒ Object
- #save ⇒ Object
-
#sftp_insecure_ciphers ⇒ Object
boolean - Are insecure SFTP ciphers allowed for this user? (If this is set to true, the site administrator has signaled that it is ok to use less secure SSH ciphers for this user.).
- #sftp_insecure_ciphers=(value) ⇒ Object
-
#site_id ⇒ Object
int64 - Site ID.
- #site_id=(value) ⇒ Object
-
#ssh_client_identification ⇒ Object
string.
- #ssh_client_identification=(value) ⇒ Object
-
#ssl_required ⇒ Object
boolean - Is SSL required for this user? (If so, ensure all your communications with this user use SSL.).
- #ssl_required=(value) ⇒ Object
-
#timeout_at ⇒ Object
date-time - Session timeout datetime.
- #timeout_at=(value) ⇒ Object
-
#trusted ⇒ Object
boolean - Can this session tolerate IP and User-Agent mismatches?.
- #trusted=(value) ⇒ Object
-
#two_factor_setup_needed ⇒ Object
boolean - If true, this user needs to add a Two Factor Authentication method before performing any further actions.
- #two_factor_setup_needed=(value) ⇒ Object
-
#use_provided_modified_at ⇒ Object
boolean - Allow the user to provide file/folder modified at dates? If false, the server will always use the current date/time.
- #use_provided_modified_at=(value) ⇒ Object
-
#user_belongs_to_parent_site ⇒ Object
boolean.
- #user_belongs_to_parent_site=(value) ⇒ Object
-
#username ⇒ Object
string - Username to sign in as.
- #username=(value) ⇒ Object
-
#windows_mode_ftp ⇒ Object
boolean - Does this user want to use Windows line-ending emulation? (CR vs CRLF).
- #windows_mode_ftp=(value) ⇒ Object
Constructor Details
#initialize(attributes = {}, options = {}) ⇒ Session
Returns a new instance of Session.
11 12 13 14 |
# File 'lib/files.com/models/session.rb', line 11 def initialize(attributes = {}, = {}) @attributes = attributes || {} @options = || {} end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
5 6 7 |
# File 'lib/files.com/models/session.rb', line 5 def attributes @attributes end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/files.com/models/session.rb', line 5 def @options end |
Class Method Details
.as_user(params = {}, options = {}) ⇒ Object
Parameters:
user_id (required) - string - User id to login as
507 508 509 510 511 512 513 |
# File 'lib/files.com/models/session.rb', line 507 def self.as_user(params = {}, = {}) raise InvalidParameterError.new("Bad parameter: user_id must be an String") if params[:user_id] and !params[:user_id].is_a?(String) raise MissingParameterError.new("Parameter missing: user_id") unless params[:user_id] response, = Api.send_request("/sessions/as_user", :post, params, ) Session.new(response.data, ) end |
.create(params = {}, options = {}) ⇒ Object
Parameters:
username - string - Username to sign in as
password - string - Password for sign in
aws_access_key_id - string - AWS Access Key ID for signing in with AWS credentials
change_password - string
change_password_confirmation - string
interface - string
ssh_client_identification - string
locale - string
no_cookie - boolean
oauth_provider - string
oauth_label - string
oauth_code - string
oauth_state - string
otp - string - If this user has a 2FA device, provide its OTP or code here.
partial_session_id - string - Identifier for a partially-completed login
475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 |
# File 'lib/files.com/models/session.rb', line 475 def self.create(params = {}, = {}) raise InvalidParameterError.new("Bad parameter: username must be an String") if params[:username] and !params[:username].is_a?(String) raise InvalidParameterError.new("Bad parameter: password must be an String") if params[:password] and !params[:password].is_a?(String) raise InvalidParameterError.new("Bad parameter: aws_access_key_id must be an String") if params[:aws_access_key_id] and !params[:aws_access_key_id].is_a?(String) raise InvalidParameterError.new("Bad parameter: change_password must be an String") if params[:change_password] and !params[:change_password].is_a?(String) raise InvalidParameterError.new("Bad parameter: change_password_confirmation must be an String") if params[:change_password_confirmation] and !params[:change_password_confirmation].is_a?(String) raise InvalidParameterError.new("Bad parameter: interface must be an String") if params[:interface] and !params[:interface].is_a?(String) raise InvalidParameterError.new("Bad parameter: ssh_client_identification must be an String") if params[:ssh_client_identification] and !params[:ssh_client_identification].is_a?(String) raise InvalidParameterError.new("Bad parameter: locale must be an String") if params[:locale] and !params[:locale].is_a?(String) raise InvalidParameterError.new("Bad parameter: oauth_provider must be an String") if params[:oauth_provider] and !params[:oauth_provider].is_a?(String) raise InvalidParameterError.new("Bad parameter: oauth_label must be an String") if params[:oauth_label] and !params[:oauth_label].is_a?(String) raise InvalidParameterError.new("Bad parameter: oauth_code must be an String") if params[:oauth_code] and !params[:oauth_code].is_a?(String) raise InvalidParameterError.new("Bad parameter: oauth_state must be an String") if params[:oauth_state] and !params[:oauth_state].is_a?(String) raise InvalidParameterError.new("Bad parameter: otp must be an String") if params[:otp] and !params[:otp].is_a?(String) raise InvalidParameterError.new("Bad parameter: partial_session_id must be an String") if params[:partial_session_id] and !params[:partial_session_id].is_a?(String) response, = Api.send_request("/sessions", :post, params, ) Session.new(response.data, ) end |
.delete(params = {}, options = {}) ⇒ Object
607 608 609 610 |
# File 'lib/files.com/models/session.rb', line 607 def self.delete(params = {}, = {}) Api.send_request("/sessions", :delete, params, ) nil end |
.destroy(params = {}, options = {}) ⇒ Object
612 613 614 615 |
# File 'lib/files.com/models/session.rb', line 612 def self.destroy(params = {}, = {}) delete(params, ) nil end |
.forgot(params = {}, options = {}) ⇒ Object
Parameters:
email - string
username - string
username_or_email - string
560 561 562 563 564 565 566 567 |
# File 'lib/files.com/models/session.rb', line 560 def self.forgot(params = {}, = {}) raise InvalidParameterError.new("Bad parameter: email must be an String") if params[:email] and !params[:email].is_a?(String) raise InvalidParameterError.new("Bad parameter: username must be an String") if params[:username] and !params[:username].is_a?(String) raise InvalidParameterError.new("Bad parameter: username_or_email must be an String") if params[:username_or_email] and !params[:username_or_email].is_a?(String) Api.send_request("/sessions/forgot", :post, params, ) nil end |
.forgot_reset(params = {}, options = {}) ⇒ Object
Parameters:
code (required) - string
password (required) - string
confirm_password - string
interface - string
locale - string
otp - string
532 533 534 535 536 537 538 539 540 541 542 543 544 |
# File 'lib/files.com/models/session.rb', line 532 def self.forgot_reset(params = {}, = {}) raise InvalidParameterError.new("Bad parameter: code must be an String") if params[:code] and !params[:code].is_a?(String) raise InvalidParameterError.new("Bad parameter: password must be an String") if params[:password] and !params[:password].is_a?(String) raise InvalidParameterError.new("Bad parameter: confirm_password must be an String") if params[:confirm_password] and !params[:confirm_password].is_a?(String) raise InvalidParameterError.new("Bad parameter: interface must be an String") if params[:interface] and !params[:interface].is_a?(String) raise InvalidParameterError.new("Bad parameter: locale must be an String") if params[:locale] and !params[:locale].is_a?(String) raise InvalidParameterError.new("Bad parameter: otp must be an String") if params[:otp] and !params[:otp].is_a?(String) raise MissingParameterError.new("Parameter missing: code") unless params[:code] raise MissingParameterError.new("Parameter missing: password") unless params[:password] Api.send_request("/sessions/forgot/reset", :post, params, ) nil end |
.forgot_validate(params = {}, options = {}) ⇒ Object
Parameters:
code (required) - string
548 549 550 551 552 553 554 |
# File 'lib/files.com/models/session.rb', line 548 def self.forgot_validate(params = {}, = {}) raise InvalidParameterError.new("Bad parameter: code must be an String") if params[:code] and !params[:code].is_a?(String) raise MissingParameterError.new("Parameter missing: code") unless params[:code] Api.send_request("/sessions/forgot/validate", :post, params, ) nil end |
.oauth(params = {}, options = {}) ⇒ Object
Parameters:
provider (required) - string
label - string
state - string
host - string
596 597 598 599 600 601 602 603 604 605 |
# File 'lib/files.com/models/session.rb', line 596 def self.oauth(params = {}, = {}) raise InvalidParameterError.new("Bad parameter: provider must be an String") if params[:provider] and !params[:provider].is_a?(String) raise InvalidParameterError.new("Bad parameter: label must be an String") if params[:label] and !params[:label].is_a?(String) raise InvalidParameterError.new("Bad parameter: state must be an String") if params[:state] and !params[:state].is_a?(String) raise InvalidParameterError.new("Bad parameter: host must be an String") if params[:host] and !params[:host].is_a?(String) raise MissingParameterError.new("Parameter missing: provider") unless params[:provider] response, = Api.send_request("/sessions/oauth", :post, params, ) OauthRedirect.new(response.data, ) end |
.pairing_key(key, params = {}, options = {}) ⇒ Object
Parameters:
key (required) - string - The pairing key to reserve for login. Cannot be reused
581 582 583 584 585 586 587 588 589 |
# File 'lib/files.com/models/session.rb', line 581 def self.pairing_key(key, params = {}, = {}) params ||= {} params[:key] = key raise InvalidParameterError.new("Bad parameter: key must be an String") if params[:key] and !params[:key].is_a?(String) raise MissingParameterError.new("Parameter missing: key") unless params[:key] response, = Api.send_request("/sessions/pairing_key/#{params[:key]}", :post, params, ) PairedApiKey.new(response.data, ) end |
.public_hosting(params = {}, options = {}) ⇒ Object
Parameters:
return_to (required) - string - Public Hosting URL to return to after authentication
571 572 573 574 575 576 577 |
# File 'lib/files.com/models/session.rb', line 571 def self.public_hosting(params = {}, = {}) raise InvalidParameterError.new("Bad parameter: return_to must be an String") if params[:return_to] and !params[:return_to].is_a?(String) raise MissingParameterError.new("Parameter missing: return_to") unless params[:return_to] response, = Api.send_request("/sessions/public_hosting", :post, params, ) PublicHostingSessionPairing.new(response.data, ) end |
.subdomain(params = {}, options = {}) ⇒ Object
Parameters:
subdomain (required) - string - Site subdomain to login to
497 498 499 500 501 502 503 |
# File 'lib/files.com/models/session.rb', line 497 def self.subdomain(params = {}, = {}) raise InvalidParameterError.new("Bad parameter: subdomain must be an String") if params[:subdomain] and !params[:subdomain].is_a?(String) raise MissingParameterError.new("Parameter missing: subdomain") unless params[:subdomain] response, = Api.send_request("/sessions/subdomain", :post, params, ) Session.new(response.data, ) end |
.trusted(params = {}, options = {}) ⇒ Object
Parameters:
session_id (required) - string - Session ID to convert to a trusted session
517 518 519 520 521 522 523 |
# File 'lib/files.com/models/session.rb', line 517 def self.trusted(params = {}, = {}) raise InvalidParameterError.new("Bad parameter: session_id must be an String") if params[:session_id] and !params[:session_id].is_a?(String) raise MissingParameterError.new("Parameter missing: session_id") unless params[:session_id] response, = Api.send_request("/sessions/trusted", :post, params, ) Session.new(response.data, ) end |
Instance Method Details
#ai_assistant_personality_id ⇒ Object
int64 - AI Assistant Personality ID for the in-app AI Assistant.
44 45 46 |
# File 'lib/files.com/models/session.rb', line 44 def ai_assistant_personality_id @attributes[:ai_assistant_personality_id] end |
#ai_assistant_personality_id=(value) ⇒ Object
48 49 50 |
# File 'lib/files.com/models/session.rb', line 48 def ai_assistant_personality_id=(value) @attributes[:ai_assistant_personality_id] = value end |
#ai_assistant_personality_system_prompt ⇒ Object
string - System prompt for the in-app AI Assistant.
53 54 55 |
# File 'lib/files.com/models/session.rb', line 53 def ai_assistant_personality_system_prompt @attributes[:ai_assistant_personality_system_prompt] end |
#ai_assistant_personality_system_prompt=(value) ⇒ Object
57 58 59 |
# File 'lib/files.com/models/session.rb', line 57 def ai_assistant_personality_system_prompt=(value) @attributes[:ai_assistant_personality_system_prompt] = value end |
#allowed_2fa_method_sms ⇒ Object
boolean - Sent only if 2FA setup is needed. Is SMS two factor authentication allowed?
188 189 190 |
# File 'lib/files.com/models/session.rb', line 188 def allowed_2fa_method_sms @attributes[:allowed_2fa_method_sms] end |
#allowed_2fa_method_sms=(value) ⇒ Object
192 193 194 |
# File 'lib/files.com/models/session.rb', line 192 def allowed_2fa_method_sms=(value) @attributes[:allowed_2fa_method_sms] = value end |
#allowed_2fa_method_totp ⇒ Object
boolean - Sent only if 2FA setup is needed. Is TOTP two factor authentication allowed?
197 198 199 |
# File 'lib/files.com/models/session.rb', line 197 def allowed_2fa_method_totp @attributes[:allowed_2fa_method_totp] end |
#allowed_2fa_method_totp=(value) ⇒ Object
201 202 203 |
# File 'lib/files.com/models/session.rb', line 201 def allowed_2fa_method_totp=(value) @attributes[:allowed_2fa_method_totp] = value end |
#allowed_2fa_method_webauthn ⇒ Object
boolean - Sent only if 2FA setup is needed. Is WebAuthn two factor authentication allowed?
206 207 208 |
# File 'lib/files.com/models/session.rb', line 206 def allowed_2fa_method_webauthn @attributes[:allowed_2fa_method_webauthn] end |
#allowed_2fa_method_webauthn=(value) ⇒ Object
210 211 212 |
# File 'lib/files.com/models/session.rb', line 210 def allowed_2fa_method_webauthn=(value) @attributes[:allowed_2fa_method_webauthn] = value end |
#allowed_2fa_method_yubi ⇒ Object
boolean - Sent only if 2FA setup is needed. Is Yubikey two factor authentication allowed?
215 216 217 |
# File 'lib/files.com/models/session.rb', line 215 def allowed_2fa_method_yubi @attributes[:allowed_2fa_method_yubi] end |
#allowed_2fa_method_yubi=(value) ⇒ Object
219 220 221 |
# File 'lib/files.com/models/session.rb', line 219 def allowed_2fa_method_yubi=(value) @attributes[:allowed_2fa_method_yubi] = value end |
#aws_access_key_id ⇒ Object
string - AWS Access Key ID for signing in with AWS credentials
332 333 334 |
# File 'lib/files.com/models/session.rb', line 332 def aws_access_key_id @attributes[:aws_access_key_id] end |
#aws_access_key_id=(value) ⇒ Object
336 337 338 |
# File 'lib/files.com/models/session.rb', line 336 def aws_access_key_id=(value) @attributes[:aws_access_key_id] = value end |
#aws_secret_key ⇒ Object
string - AWS Secret Key for validating AWS-style signatures in the Inbound S3 endpoint.
35 36 37 |
# File 'lib/files.com/models/session.rb', line 35 def aws_secret_key @attributes[:aws_secret_key] end |
#aws_secret_key=(value) ⇒ Object
39 40 41 |
# File 'lib/files.com/models/session.rb', line 39 def aws_secret_key=(value) @attributes[:aws_secret_key] = value end |
#calculate_file_checksums_crc32 ⇒ Object
boolean - Calculate CRC32 checksum for incoming files?
224 225 226 |
# File 'lib/files.com/models/session.rb', line 224 def calculate_file_checksums_crc32 @attributes[:calculate_file_checksums_crc32] end |
#calculate_file_checksums_crc32=(value) ⇒ Object
228 229 230 |
# File 'lib/files.com/models/session.rb', line 228 def calculate_file_checksums_crc32=(value) @attributes[:calculate_file_checksums_crc32] = value end |
#calculate_file_checksums_md5 ⇒ Object
boolean - Calculate MD5 checksum for incoming files?
233 234 235 |
# File 'lib/files.com/models/session.rb', line 233 def calculate_file_checksums_md5 @attributes[:calculate_file_checksums_md5] end |
#calculate_file_checksums_md5=(value) ⇒ Object
237 238 239 |
# File 'lib/files.com/models/session.rb', line 237 def calculate_file_checksums_md5=(value) @attributes[:calculate_file_checksums_md5] = value end |
#calculate_file_checksums_sha1 ⇒ Object
boolean - Calculate SHA1 checksum for incoming files?
242 243 244 |
# File 'lib/files.com/models/session.rb', line 242 def calculate_file_checksums_sha1 @attributes[:calculate_file_checksums_sha1] end |
#calculate_file_checksums_sha1=(value) ⇒ Object
246 247 248 |
# File 'lib/files.com/models/session.rb', line 246 def calculate_file_checksums_sha1=(value) @attributes[:calculate_file_checksums_sha1] = value end |
#calculate_file_checksums_sha256 ⇒ Object
boolean - Calculate SHA256 checksum for incoming files?
251 252 253 |
# File 'lib/files.com/models/session.rb', line 251 def calculate_file_checksums_sha256 @attributes[:calculate_file_checksums_sha256] end |
#calculate_file_checksums_sha256=(value) ⇒ Object
255 256 257 |
# File 'lib/files.com/models/session.rb', line 255 def calculate_file_checksums_sha256=(value) @attributes[:calculate_file_checksums_sha256] = value end |
#change_password ⇒ Object
string
341 342 343 |
# File 'lib/files.com/models/session.rb', line 341 def change_password @attributes[:change_password] end |
#change_password=(value) ⇒ Object
345 346 347 |
# File 'lib/files.com/models/session.rb', line 345 def change_password=(value) @attributes[:change_password] = value end |
#change_password_confirmation ⇒ Object
string
350 351 352 |
# File 'lib/files.com/models/session.rb', line 350 def change_password_confirmation @attributes[:change_password_confirmation] end |
#change_password_confirmation=(value) ⇒ Object
354 355 356 |
# File 'lib/files.com/models/session.rb', line 354 def change_password_confirmation=(value) @attributes[:change_password_confirmation] = value end |
#default_workspace_id ⇒ Object
int64 - Workspace ID the user should land in by default when more than one Workspace is available.
80 81 82 |
# File 'lib/files.com/models/session.rb', line 80 def default_workspace_id @attributes[:default_workspace_id] end |
#default_workspace_id=(value) ⇒ Object
84 85 86 |
# File 'lib/files.com/models/session.rb', line 84 def default_workspace_id=(value) @attributes[:default_workspace_id] = value end |
#destroy(params = {}, options = {}) ⇒ Object
7 8 9 |
# File 'lib/files.com/models/session.rb', line 7 def destroy(params = {}, = {}) Session.destroy(params, .merge(session: self, session_id: nil)) end |
#finalize_partial_uploads ⇒ Object
boolean - Finalize partial SFTP uploads?
269 270 271 |
# File 'lib/files.com/models/session.rb', line 269 def finalize_partial_uploads @attributes[:finalize_partial_uploads] end |
#finalize_partial_uploads=(value) ⇒ Object
273 274 275 |
# File 'lib/files.com/models/session.rb', line 273 def finalize_partial_uploads=(value) @attributes[:finalize_partial_uploads] = value end |
#home_path ⇒ Object
string - Initial path to start the user's session in.
125 126 127 |
# File 'lib/files.com/models/session.rb', line 125 def home_path @attributes[:home_path] end |
#home_path=(value) ⇒ Object
129 130 131 |
# File 'lib/files.com/models/session.rb', line 129 def home_path=(value) @attributes[:home_path] = value end |
#id ⇒ Object
string - Session ID
17 18 19 |
# File 'lib/files.com/models/session.rb', line 17 def id @attributes[:id] end |
#id=(value) ⇒ Object
21 22 23 |
# File 'lib/files.com/models/session.rb', line 21 def id=(value) @attributes[:id] = value end |
#impersonator_user_id ⇒ Object
int64 - User ID of the Site Admin who initiated a Read-Only session impersonating this session's user
305 306 307 |
# File 'lib/files.com/models/session.rb', line 305 def impersonator_user_id @attributes[:impersonator_user_id] end |
#impersonator_user_id=(value) ⇒ Object
309 310 311 |
# File 'lib/files.com/models/session.rb', line 309 def impersonator_user_id=(value) @attributes[:impersonator_user_id] = value end |
#interface ⇒ Object
string
359 360 361 |
# File 'lib/files.com/models/session.rb', line 359 def interface @attributes[:interface] end |
#interface=(value) ⇒ Object
363 364 365 |
# File 'lib/files.com/models/session.rb', line 363 def interface=(value) @attributes[:interface] = value end |
#language ⇒ Object
string - Session language
26 27 28 |
# File 'lib/files.com/models/session.rb', line 26 def language @attributes[:language] end |
#language=(value) ⇒ Object
30 31 32 |
# File 'lib/files.com/models/session.rb', line 30 def language=(value) @attributes[:language] = value end |
#legacy_checksums_mode ⇒ Object
boolean - Use legacy checksums mode?
260 261 262 |
# File 'lib/files.com/models/session.rb', line 260 def legacy_checksums_mode @attributes[:legacy_checksums_mode] end |
#legacy_checksums_mode=(value) ⇒ Object
264 265 266 |
# File 'lib/files.com/models/session.rb', line 264 def legacy_checksums_mode=(value) @attributes[:legacy_checksums_mode] = value end |
#locale ⇒ Object
string
377 378 379 |
# File 'lib/files.com/models/session.rb', line 377 def locale @attributes[:locale] end |
#locale=(value) ⇒ Object
381 382 383 |
# File 'lib/files.com/models/session.rb', line 381 def locale=(value) @attributes[:locale] = value end |
#login_token ⇒ Object
string - Login token. If set, this token will allow your user to log in via browser at the domain in login_token_domain.
62 63 64 |
# File 'lib/files.com/models/session.rb', line 62 def login_token @attributes[:login_token] end |
#login_token=(value) ⇒ Object
66 67 68 |
# File 'lib/files.com/models/session.rb', line 66 def login_token=(value) @attributes[:login_token] = value end |
#login_token_domain ⇒ Object
string - Domain to use with login_token.
71 72 73 |
# File 'lib/files.com/models/session.rb', line 71 def login_token_domain @attributes[:login_token_domain] end |
#login_token_domain=(value) ⇒ Object
75 76 77 |
# File 'lib/files.com/models/session.rb', line 75 def login_token_domain=(value) @attributes[:login_token_domain] = value end |
#max_dir_listing_size ⇒ Object
int64 - Maximum number of files to retrieve per folder for a directory listing. This is based on the user's plan.
89 90 91 |
# File 'lib/files.com/models/session.rb', line 89 def max_dir_listing_size @attributes[:max_dir_listing_size] end |
#max_dir_listing_size=(value) ⇒ Object
93 94 95 |
# File 'lib/files.com/models/session.rb', line 93 def max_dir_listing_size=(value) @attributes[:max_dir_listing_size] = value end |
#multiple_regions ⇒ Object
boolean - Can access multiple regions?
98 99 100 |
# File 'lib/files.com/models/session.rb', line 98 def multiple_regions @attributes[:multiple_regions] end |
#multiple_regions=(value) ⇒ Object
102 103 104 |
# File 'lib/files.com/models/session.rb', line 102 def multiple_regions=(value) @attributes[:multiple_regions] = value end |
#no_cookie ⇒ Object
boolean
386 387 388 |
# File 'lib/files.com/models/session.rb', line 386 def @attributes[:no_cookie] end |
#no_cookie=(value) ⇒ Object
390 391 392 |
# File 'lib/files.com/models/session.rb', line 390 def (value) @attributes[:no_cookie] = value end |
#oauth_code ⇒ Object
string
413 414 415 |
# File 'lib/files.com/models/session.rb', line 413 def oauth_code @attributes[:oauth_code] end |
#oauth_code=(value) ⇒ Object
417 418 419 |
# File 'lib/files.com/models/session.rb', line 417 def oauth_code=(value) @attributes[:oauth_code] = value end |
#oauth_label ⇒ Object
string
404 405 406 |
# File 'lib/files.com/models/session.rb', line 404 def oauth_label @attributes[:oauth_label] end |
#oauth_label=(value) ⇒ Object
408 409 410 |
# File 'lib/files.com/models/session.rb', line 408 def oauth_label=(value) @attributes[:oauth_label] = value end |
#oauth_provider ⇒ Object
string
395 396 397 |
# File 'lib/files.com/models/session.rb', line 395 def oauth_provider @attributes[:oauth_provider] end |
#oauth_provider=(value) ⇒ Object
399 400 401 |
# File 'lib/files.com/models/session.rb', line 399 def oauth_provider=(value) @attributes[:oauth_provider] = value end |
#oauth_state ⇒ Object
string
422 423 424 |
# File 'lib/files.com/models/session.rb', line 422 def oauth_state @attributes[:oauth_state] end |
#oauth_state=(value) ⇒ Object
426 427 428 |
# File 'lib/files.com/models/session.rb', line 426 def oauth_state=(value) @attributes[:oauth_state] = value end |
#otp ⇒ Object
string - If this user has a 2FA device, provide its OTP or code here.
431 432 433 |
# File 'lib/files.com/models/session.rb', line 431 def otp @attributes[:otp] end |
#otp=(value) ⇒ Object
435 436 437 |
# File 'lib/files.com/models/session.rb', line 435 def otp=(value) @attributes[:otp] = value end |
#partial_session_id ⇒ Object
string - Identifier for a partially-completed login
440 441 442 |
# File 'lib/files.com/models/session.rb', line 440 def partial_session_id @attributes[:partial_session_id] end |
#partial_session_id=(value) ⇒ Object
444 445 446 |
# File 'lib/files.com/models/session.rb', line 444 def partial_session_id=(value) @attributes[:partial_session_id] = value end |
#password ⇒ Object
string - Password for sign in
323 324 325 |
# File 'lib/files.com/models/session.rb', line 323 def password @attributes[:password] end |
#password=(value) ⇒ Object
327 328 329 |
# File 'lib/files.com/models/session.rb', line 327 def password=(value) @attributes[:password] = value end |
#read_only ⇒ Object
boolean - Is this session read only?
107 108 109 |
# File 'lib/files.com/models/session.rb', line 107 def read_only @attributes[:read_only] end |
#read_only=(value) ⇒ Object
111 112 113 |
# File 'lib/files.com/models/session.rb', line 111 def read_only=(value) @attributes[:read_only] = value end |
#root_path ⇒ Object
string - Root path to restrict the user's session to.
116 117 118 |
# File 'lib/files.com/models/session.rb', line 116 def root_path @attributes[:root_path] end |
#root_path=(value) ⇒ Object
120 121 122 |
# File 'lib/files.com/models/session.rb', line 120 def root_path=(value) @attributes[:root_path] = value end |
#save ⇒ Object
448 449 450 451 452 453 454 455 456 457 |
# File 'lib/files.com/models/session.rb', line 448 def save if @attributes[:id] raise NotImplementedError.new("The Session object doesn't support updates.") else new_obj = Session.create(@attributes, @options) end @attributes = new_obj.attributes true end |
#sftp_insecure_ciphers ⇒ Object
boolean - Are insecure SFTP ciphers allowed for this user? (If this is set to true, the site administrator has signaled that it is ok to use less secure SSH ciphers for this user.)
134 135 136 |
# File 'lib/files.com/models/session.rb', line 134 def sftp_insecure_ciphers @attributes[:sftp_insecure_ciphers] end |
#sftp_insecure_ciphers=(value) ⇒ Object
138 139 140 |
# File 'lib/files.com/models/session.rb', line 138 def sftp_insecure_ciphers=(value) @attributes[:sftp_insecure_ciphers] = value end |
#site_id ⇒ Object
int64 - Site ID
143 144 145 |
# File 'lib/files.com/models/session.rb', line 143 def site_id @attributes[:site_id] end |
#site_id=(value) ⇒ Object
147 148 149 |
# File 'lib/files.com/models/session.rb', line 147 def site_id=(value) @attributes[:site_id] = value end |
#ssh_client_identification ⇒ Object
string
368 369 370 |
# File 'lib/files.com/models/session.rb', line 368 def ssh_client_identification @attributes[:ssh_client_identification] end |
#ssh_client_identification=(value) ⇒ Object
372 373 374 |
# File 'lib/files.com/models/session.rb', line 372 def ssh_client_identification=(value) @attributes[:ssh_client_identification] = value end |
#ssl_required ⇒ Object
boolean - Is SSL required for this user? (If so, ensure all your communications with this user use SSL.)
152 153 154 |
# File 'lib/files.com/models/session.rb', line 152 def ssl_required @attributes[:ssl_required] end |
#ssl_required=(value) ⇒ Object
156 157 158 |
# File 'lib/files.com/models/session.rb', line 156 def ssl_required=(value) @attributes[:ssl_required] = value end |
#timeout_at ⇒ Object
date-time - Session timeout datetime
161 162 163 |
# File 'lib/files.com/models/session.rb', line 161 def timeout_at @attributes[:timeout_at] end |
#timeout_at=(value) ⇒ Object
165 166 167 |
# File 'lib/files.com/models/session.rb', line 165 def timeout_at=(value) @attributes[:timeout_at] = value end |
#trusted ⇒ Object
boolean - Can this session tolerate IP and User-Agent mismatches?
170 171 172 |
# File 'lib/files.com/models/session.rb', line 170 def trusted @attributes[:trusted] end |
#trusted=(value) ⇒ Object
174 175 176 |
# File 'lib/files.com/models/session.rb', line 174 def trusted=(value) @attributes[:trusted] = value end |
#two_factor_setup_needed ⇒ Object
boolean - If true, this user needs to add a Two Factor Authentication method before performing any further actions.
179 180 181 |
# File 'lib/files.com/models/session.rb', line 179 def two_factor_setup_needed @attributes[:two_factor_setup_needed] end |
#two_factor_setup_needed=(value) ⇒ Object
183 184 185 |
# File 'lib/files.com/models/session.rb', line 183 def two_factor_setup_needed=(value) @attributes[:two_factor_setup_needed] = value end |
#use_provided_modified_at ⇒ Object
boolean - Allow the user to provide file/folder modified at dates? If false, the server will always use the current date/time.
278 279 280 |
# File 'lib/files.com/models/session.rb', line 278 def use_provided_modified_at @attributes[:use_provided_modified_at] end |
#use_provided_modified_at=(value) ⇒ Object
282 283 284 |
# File 'lib/files.com/models/session.rb', line 282 def use_provided_modified_at=(value) @attributes[:use_provided_modified_at] = value end |
#user_belongs_to_parent_site ⇒ Object
boolean
296 297 298 |
# File 'lib/files.com/models/session.rb', line 296 def user_belongs_to_parent_site @attributes[:user_belongs_to_parent_site] end |
#user_belongs_to_parent_site=(value) ⇒ Object
300 301 302 |
# File 'lib/files.com/models/session.rb', line 300 def user_belongs_to_parent_site=(value) @attributes[:user_belongs_to_parent_site] = value end |
#username ⇒ Object
string - Username to sign in as
314 315 316 |
# File 'lib/files.com/models/session.rb', line 314 def username @attributes[:username] end |
#username=(value) ⇒ Object
318 319 320 |
# File 'lib/files.com/models/session.rb', line 318 def username=(value) @attributes[:username] = value end |
#windows_mode_ftp ⇒ Object
boolean - Does this user want to use Windows line-ending emulation? (CR vs CRLF)
287 288 289 |
# File 'lib/files.com/models/session.rb', line 287 def windows_mode_ftp @attributes[:windows_mode_ftp] end |
#windows_mode_ftp=(value) ⇒ Object
291 292 293 |
# File 'lib/files.com/models/session.rb', line 291 def windows_mode_ftp=(value) @attributes[:windows_mode_ftp] = value end |