Class: Files::SsoStrategy

Inherits:
Object
  • Object
show all
Defined in:
lib/files.com/models/sso_strategy.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}, options = {}) ⇒ SsoStrategy

Returns a new instance of SsoStrategy.



7
8
9
10
# File 'lib/files.com/models/sso_strategy.rb', line 7

def initialize(attributes = {}, options = {})
  @attributes = attributes || {}
  @options = options || {}
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



5
6
7
# File 'lib/files.com/models/sso_strategy.rb', line 5

def attributes
  @attributes
end

#optionsObject (readonly)

Returns the value of attribute options.



5
6
7
# File 'lib/files.com/models/sso_strategy.rb', line 5

def options
  @options
end

Class Method Details

.all(params = {}, options = {}) ⇒ Object



327
328
329
# File 'lib/files.com/models/sso_strategy.rb', line 327

def self.all(params = {}, options = {})
  list(params, options)
end

.create(params = {}, options = {}) ⇒ Object

Parameters:

provider (required) - string - One of the following: google, auth0, okta, atlassian, azure, box, dropbox, slack, ubuntu, onelogin, saml
subdomain - string - Subdomain or domain name for your auth provider.   Example: `https://[subdomain].okta.com/`
client_id - string - OAuth Client ID for your auth provider.
client_secret - string - OAuth Client Secret for your auth provider.
saml_provider_metadata_url - string - Metadata URL for the SAML identity provider
saml_provider_cert_fingerprint - string - Identity provider sha256 cert fingerprint if saml_provider_metadata_url is not available.
saml_provider_issuer_url - string - Identity provider issuer url
saml_provider_slo_target_url - string - Identity provider SLO endpoint
saml_provider_sso_target_url - string - Identity provider SSO endpoint if saml_provider_metadata_url is not available.
scim_authentication_method - string - The authentication method to use when using scim provisioning
scim_password - string - Password for scim integration if using basic auth
scim_username - string - Username for scim integration
protocol - string - SSO Protocol
provision_users - boolean - Auto-provision users?
provision_groups - boolean - Auto-provision group memberships?
provision_group_default - string - Comma-separated list of group names for groups to automatically add all auto-provisioned users to.
provision_group_exclusion - string - Comma-separated list of group names for groups (with optional wildcards) that will be excluded from auto-provisioning.
provision_group_inclusion - string - Comma-separated list of group names for groups (with optional wildcards) that will be auto-provisioned.
provision_group_required - string - Comma or newline separated list of group names (with optional wildcards) to require membership for user provisioning.
provision_attachments_permission - boolean - Provisioned users to get sharing permission?
provision_dav_permission - boolean - Provisioned users to get WebDAV permission?
provision_ftp_permission - boolean - Provisioned users to get FTP permission?
provision_sftp_permission - boolean - Provisioned users to get SFTP permission?
provision_time_zone - string - Default timezone to use for provisioned users


372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
# File 'lib/files.com/models/sso_strategy.rb', line 372

def self.create(params = {}, options = {})
  raise InvalidParameterError.new("Bad parameter: provider must be an String") if params.dig(:provider) and !params.dig(:provider).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: subdomain must be an String") if params.dig(:subdomain) and !params.dig(:subdomain).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: client_id must be an String") if params.dig(:client_id) and !params.dig(:client_id).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: client_secret must be an String") if params.dig(:client_secret) and !params.dig(:client_secret).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: saml_provider_metadata_url must be an String") if params.dig(:saml_provider_metadata_url) and !params.dig(:saml_provider_metadata_url).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: saml_provider_cert_fingerprint must be an String") if params.dig(:saml_provider_cert_fingerprint) and !params.dig(:saml_provider_cert_fingerprint).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: saml_provider_issuer_url must be an String") if params.dig(:saml_provider_issuer_url) and !params.dig(:saml_provider_issuer_url).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: saml_provider_slo_target_url must be an String") if params.dig(:saml_provider_slo_target_url) and !params.dig(:saml_provider_slo_target_url).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: saml_provider_sso_target_url must be an String") if params.dig(:saml_provider_sso_target_url) and !params.dig(:saml_provider_sso_target_url).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: scim_authentication_method must be an String") if params.dig(:scim_authentication_method) and !params.dig(:scim_authentication_method).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: scim_password must be an String") if params.dig(:scim_password) and !params.dig(:scim_password).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: scim_username must be an String") if params.dig(:scim_username) and !params.dig(:scim_username).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: protocol must be an String") if params.dig(:protocol) and !params.dig(:protocol).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: provision_group_default must be an String") if params.dig(:provision_group_default) and !params.dig(:provision_group_default).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: provision_group_exclusion must be an String") if params.dig(:provision_group_exclusion) and !params.dig(:provision_group_exclusion).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: provision_group_inclusion must be an String") if params.dig(:provision_group_inclusion) and !params.dig(:provision_group_inclusion).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: provision_group_required must be an String") if params.dig(:provision_group_required) and !params.dig(:provision_group_required).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: provision_time_zone must be an String") if params.dig(:provision_time_zone) and !params.dig(:provision_time_zone).is_a?(String)
  raise MissingParameterError.new("Parameter missing: provider") unless params.dig(:provider)

  response, options = Api.send_request("/sso_strategies", :post, params, options)
  SsoStrategy.new(response.data, options)
end

.delete(id, params = {}, options = {}) ⇒ Object



451
452
453
454
455
456
457
458
459
# File 'lib/files.com/models/sso_strategy.rb', line 451

def self.delete(id, params = {}, options = {})
  params ||= {}
  params[:id] = id
  raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
  raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)

  response, _options = Api.send_request("/sso_strategies/#{params[:id]}", :delete, params, options)
  response.data
end

.destroy(id, params = {}, options = {}) ⇒ Object



461
462
463
# File 'lib/files.com/models/sso_strategy.rb', line 461

def self.destroy(id, params = {}, options = {})
  delete(id, params, options)
end

.find(id, params = {}, options = {}) ⇒ Object

Parameters:

id (required) - integer - Sso Strategy ID.


333
334
335
336
337
338
339
340
341
# File 'lib/files.com/models/sso_strategy.rb', line 333

def self.find(id, params = {}, options = {})
  params ||= {}
  params[:id] = id
  raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
  raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)

  response, options = Api.send_request("/sso_strategies/#{params[:id]}", :get, params, options)
  SsoStrategy.new(response.data, options)
end

.get(id, params = {}, options = {}) ⇒ Object



343
344
345
# File 'lib/files.com/models/sso_strategy.rb', line 343

def self.get(id, params = {}, options = {})
  find(id, params, options)
end

.list(params = {}, options = {}) ⇒ Object

Parameters:

page - integer - Current page number.
per_page - integer - Number of records to show per page.  (Max: 10,000, 1,000 or less is recommended).
action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.


318
319
320
321
322
323
324
325
# File 'lib/files.com/models/sso_strategy.rb', line 318

def self.list(params = {}, options = {})
  raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
  raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
  raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)

  response, options = Api.send_request("/sso_strategies", :get, params, options)
  response.data.map { |object| SsoStrategy.new(object, options) }
end

.update(id, params = {}, options = {}) ⇒ Object

Parameters:

provider (required) - string - One of the following: google, auth0, okta, atlassian, azure, box, dropbox, slack, ubuntu, onelogin, saml
subdomain - string - Subdomain or domain name for your auth provider.   Example: `https://[subdomain].okta.com/`
client_id - string - OAuth Client ID for your auth provider.
client_secret - string - OAuth Client Secret for your auth provider.
saml_provider_metadata_url - string - Metadata URL for the SAML identity provider
saml_provider_cert_fingerprint - string - Identity provider sha256 cert fingerprint if saml_provider_metadata_url is not available.
saml_provider_issuer_url - string - Identity provider issuer url
saml_provider_slo_target_url - string - Identity provider SLO endpoint
saml_provider_sso_target_url - string - Identity provider SSO endpoint if saml_provider_metadata_url is not available.
scim_authentication_method - string - The authentication method to use when using scim provisioning
scim_password - string - Password for scim integration if using basic auth
scim_username - string - Username for scim integration
protocol - string - SSO Protocol
provision_users - boolean - Auto-provision users?
provision_groups - boolean - Auto-provision group memberships?
provision_group_default - string - Comma-separated list of group names for groups to automatically add all auto-provisioned users to.
provision_group_exclusion - string - Comma-separated list of group names for groups (with optional wildcards) that will be excluded from auto-provisioning.
provision_group_inclusion - string - Comma-separated list of group names for groups (with optional wildcards) that will be auto-provisioned.
provision_group_required - string - Comma or newline separated list of group names (with optional wildcards) to require membership for user provisioning.
provision_attachments_permission - boolean - Provisioned users to get sharing permission?
provision_dav_permission - boolean - Provisioned users to get WebDAV permission?
provision_ftp_permission - boolean - Provisioned users to get FTP permission?
provision_sftp_permission - boolean - Provisioned users to get SFTP permission?
provision_time_zone - string - Default timezone to use for provisioned users


422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
# File 'lib/files.com/models/sso_strategy.rb', line 422

def self.update(id, params = {}, options = {})
  params ||= {}
  params[:id] = id
  raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
  raise InvalidParameterError.new("Bad parameter: provider must be an String") if params.dig(:provider) and !params.dig(:provider).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: subdomain must be an String") if params.dig(:subdomain) and !params.dig(:subdomain).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: client_id must be an String") if params.dig(:client_id) and !params.dig(:client_id).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: client_secret must be an String") if params.dig(:client_secret) and !params.dig(:client_secret).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: saml_provider_metadata_url must be an String") if params.dig(:saml_provider_metadata_url) and !params.dig(:saml_provider_metadata_url).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: saml_provider_cert_fingerprint must be an String") if params.dig(:saml_provider_cert_fingerprint) and !params.dig(:saml_provider_cert_fingerprint).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: saml_provider_issuer_url must be an String") if params.dig(:saml_provider_issuer_url) and !params.dig(:saml_provider_issuer_url).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: saml_provider_slo_target_url must be an String") if params.dig(:saml_provider_slo_target_url) and !params.dig(:saml_provider_slo_target_url).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: saml_provider_sso_target_url must be an String") if params.dig(:saml_provider_sso_target_url) and !params.dig(:saml_provider_sso_target_url).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: scim_authentication_method must be an String") if params.dig(:scim_authentication_method) and !params.dig(:scim_authentication_method).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: scim_password must be an String") if params.dig(:scim_password) and !params.dig(:scim_password).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: scim_username must be an String") if params.dig(:scim_username) and !params.dig(:scim_username).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: protocol must be an String") if params.dig(:protocol) and !params.dig(:protocol).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: provision_group_default must be an String") if params.dig(:provision_group_default) and !params.dig(:provision_group_default).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: provision_group_exclusion must be an String") if params.dig(:provision_group_exclusion) and !params.dig(:provision_group_exclusion).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: provision_group_inclusion must be an String") if params.dig(:provision_group_inclusion) and !params.dig(:provision_group_inclusion).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: provision_group_required must be an String") if params.dig(:provision_group_required) and !params.dig(:provision_group_required).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: provision_time_zone must be an String") if params.dig(:provision_time_zone) and !params.dig(:provision_time_zone).is_a?(String)
  raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
  raise MissingParameterError.new("Parameter missing: provider") unless params.dig(:provider)

  response, options = Api.send_request("/sso_strategies/#{params[:id]}", :patch, params, options)
  SsoStrategy.new(response.data, options)
end

Instance Method Details

#client_idObject

string - OAuth Client ID for your auth provider.



211
212
213
# File 'lib/files.com/models/sso_strategy.rb', line 211

def client_id
  @attributes[:client_id]
end

#client_id=(value) ⇒ Object



215
216
217
# File 'lib/files.com/models/sso_strategy.rb', line 215

def client_id=(value)
  @attributes[:client_id] = value
end

#client_secretObject

string - OAuth Client Secret for your auth provider.



220
221
222
# File 'lib/files.com/models/sso_strategy.rb', line 220

def client_secret
  @attributes[:client_secret]
end

#client_secret=(value) ⇒ Object



224
225
226
# File 'lib/files.com/models/sso_strategy.rb', line 224

def client_secret=(value)
  @attributes[:client_secret] = value
end

#delete(params = {}) ⇒ Object



291
292
293
294
295
296
297
298
299
# File 'lib/files.com/models/sso_strategy.rb', line 291

def delete(params = {})
  params ||= {}
  params[:id] = @attributes[:id]
  raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
  raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
  raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)

  Api.send_request("/sso_strategies/#{@attributes[:id]}", :delete, params, @options)
end

#destroy(params = {}) ⇒ Object



301
302
303
# File 'lib/files.com/models/sso_strategy.rb', line 301

def destroy(params = {})
  delete(params)
end

#idObject

int64 - ID



31
32
33
# File 'lib/files.com/models/sso_strategy.rb', line 31

def id
  @attributes[:id]
end

#id=(value) ⇒ Object



35
36
37
# File 'lib/files.com/models/sso_strategy.rb', line 35

def id=(value)
  @attributes[:id] = value
end

#protocolObject

string - SSO Protocol



13
14
15
# File 'lib/files.com/models/sso_strategy.rb', line 13

def protocol
  @attributes[:protocol]
end

#protocol=(value) ⇒ Object



17
18
19
# File 'lib/files.com/models/sso_strategy.rb', line 17

def protocol=(value)
  @attributes[:protocol] = value
end

#providerObject

string - Provider name



22
23
24
# File 'lib/files.com/models/sso_strategy.rb', line 22

def provider
  @attributes[:provider]
end

#provider=(value) ⇒ Object



26
27
28
# File 'lib/files.com/models/sso_strategy.rb', line 26

def provider=(value)
  @attributes[:provider] = value
end

#provision_attachments_permissionObject

boolean - Auto-provisioned users get Sharing permission?



166
167
168
# File 'lib/files.com/models/sso_strategy.rb', line 166

def provision_attachments_permission
  @attributes[:provision_attachments_permission]
end

#provision_attachments_permission=(value) ⇒ Object



170
171
172
# File 'lib/files.com/models/sso_strategy.rb', line 170

def provision_attachments_permission=(value)
  @attributes[:provision_attachments_permission] = value
end

#provision_dav_permissionObject

boolean - Auto-provisioned users get WebDAV permission?



175
176
177
# File 'lib/files.com/models/sso_strategy.rb', line 175

def provision_dav_permission
  @attributes[:provision_dav_permission]
end

#provision_dav_permission=(value) ⇒ Object



179
180
181
# File 'lib/files.com/models/sso_strategy.rb', line 179

def provision_dav_permission=(value)
  @attributes[:provision_dav_permission] = value
end

#provision_ftp_permissionObject

boolean - Auto-provisioned users get FTP permission?



184
185
186
# File 'lib/files.com/models/sso_strategy.rb', line 184

def provision_ftp_permission
  @attributes[:provision_ftp_permission]
end

#provision_ftp_permission=(value) ⇒ Object



188
189
190
# File 'lib/files.com/models/sso_strategy.rb', line 188

def provision_ftp_permission=(value)
  @attributes[:provision_ftp_permission] = value
end

#provision_group_defaultObject

string - Comma-separated list of group names for groups to automatically add all auto-provisioned users to.



130
131
132
# File 'lib/files.com/models/sso_strategy.rb', line 130

def provision_group_default
  @attributes[:provision_group_default]
end

#provision_group_default=(value) ⇒ Object



134
135
136
# File 'lib/files.com/models/sso_strategy.rb', line 134

def provision_group_default=(value)
  @attributes[:provision_group_default] = value
end

#provision_group_exclusionObject

string - Comma-separated list of group names for groups (with optional wildcards) that will be excluded from auto-provisioning.



139
140
141
# File 'lib/files.com/models/sso_strategy.rb', line 139

def provision_group_exclusion
  @attributes[:provision_group_exclusion]
end

#provision_group_exclusion=(value) ⇒ Object



143
144
145
# File 'lib/files.com/models/sso_strategy.rb', line 143

def provision_group_exclusion=(value)
  @attributes[:provision_group_exclusion] = value
end

#provision_group_inclusionObject

string - Comma-separated list of group names for groups (with optional wildcards) that will be auto-provisioned.



148
149
150
# File 'lib/files.com/models/sso_strategy.rb', line 148

def provision_group_inclusion
  @attributes[:provision_group_inclusion]
end

#provision_group_inclusion=(value) ⇒ Object



152
153
154
# File 'lib/files.com/models/sso_strategy.rb', line 152

def provision_group_inclusion=(value)
  @attributes[:provision_group_inclusion] = value
end

#provision_group_requiredObject

string - Comma or newline separated list of group names (with optional wildcards) to require membership for user provisioning.



157
158
159
# File 'lib/files.com/models/sso_strategy.rb', line 157

def provision_group_required
  @attributes[:provision_group_required]
end

#provision_group_required=(value) ⇒ Object



161
162
163
# File 'lib/files.com/models/sso_strategy.rb', line 161

def provision_group_required=(value)
  @attributes[:provision_group_required] = value
end

#provision_groupsObject

boolean - Auto-provision group membership based on group memberships on the SSO side?



121
122
123
# File 'lib/files.com/models/sso_strategy.rb', line 121

def provision_groups
  @attributes[:provision_groups]
end

#provision_groups=(value) ⇒ Object



125
126
127
# File 'lib/files.com/models/sso_strategy.rb', line 125

def provision_groups=(value)
  @attributes[:provision_groups] = value
end

#provision_sftp_permissionObject

boolean - Auto-provisioned users get SFTP permission?



193
194
195
# File 'lib/files.com/models/sso_strategy.rb', line 193

def provision_sftp_permission
  @attributes[:provision_sftp_permission]
end

#provision_sftp_permission=(value) ⇒ Object



197
198
199
# File 'lib/files.com/models/sso_strategy.rb', line 197

def provision_sftp_permission=(value)
  @attributes[:provision_sftp_permission] = value
end

#provision_time_zoneObject

string - Default time zone for auto provisioned users.



202
203
204
# File 'lib/files.com/models/sso_strategy.rb', line 202

def provision_time_zone
  @attributes[:provision_time_zone]
end

#provision_time_zone=(value) ⇒ Object



206
207
208
# File 'lib/files.com/models/sso_strategy.rb', line 206

def provision_time_zone=(value)
  @attributes[:provision_time_zone] = value
end

#provision_usersObject

boolean - Auto-provision users?



112
113
114
# File 'lib/files.com/models/sso_strategy.rb', line 112

def provision_users
  @attributes[:provision_users]
end

#provision_users=(value) ⇒ Object



116
117
118
# File 'lib/files.com/models/sso_strategy.rb', line 116

def provision_users=(value)
  @attributes[:provision_users] = value
end

#saml_provider_cert_fingerprintObject

string - Identity provider sha256 cert fingerprint if saml_provider_metadata_url is not available.



40
41
42
# File 'lib/files.com/models/sso_strategy.rb', line 40

def saml_provider_cert_fingerprint
  @attributes[:saml_provider_cert_fingerprint]
end

#saml_provider_cert_fingerprint=(value) ⇒ Object



44
45
46
# File 'lib/files.com/models/sso_strategy.rb', line 44

def saml_provider_cert_fingerprint=(value)
  @attributes[:saml_provider_cert_fingerprint] = value
end

#saml_provider_issuer_urlObject

string - Identity provider issuer url



49
50
51
# File 'lib/files.com/models/sso_strategy.rb', line 49

def saml_provider_issuer_url
  @attributes[:saml_provider_issuer_url]
end

#saml_provider_issuer_url=(value) ⇒ Object



53
54
55
# File 'lib/files.com/models/sso_strategy.rb', line 53

def saml_provider_issuer_url=(value)
  @attributes[:saml_provider_issuer_url] = value
end

#saml_provider_metadata_urlObject

string - Metadata URL for the SAML identity provider



58
59
60
# File 'lib/files.com/models/sso_strategy.rb', line 58

def 
  @attributes[:saml_provider_metadata_url]
end

#saml_provider_metadata_url=(value) ⇒ Object



62
63
64
# File 'lib/files.com/models/sso_strategy.rb', line 62

def (value)
  @attributes[:saml_provider_metadata_url] = value
end

#saml_provider_slo_target_urlObject

string - Identity provider SLO endpoint



67
68
69
# File 'lib/files.com/models/sso_strategy.rb', line 67

def saml_provider_slo_target_url
  @attributes[:saml_provider_slo_target_url]
end

#saml_provider_slo_target_url=(value) ⇒ Object



71
72
73
# File 'lib/files.com/models/sso_strategy.rb', line 71

def saml_provider_slo_target_url=(value)
  @attributes[:saml_provider_slo_target_url] = value
end

#saml_provider_sso_target_urlObject

string - Identity provider SSO endpoint if saml_provider_metadata_url is not available.



76
77
78
# File 'lib/files.com/models/sso_strategy.rb', line 76

def saml_provider_sso_target_url
  @attributes[:saml_provider_sso_target_url]
end

#saml_provider_sso_target_url=(value) ⇒ Object



80
81
82
# File 'lib/files.com/models/sso_strategy.rb', line 80

def saml_provider_sso_target_url=(value)
  @attributes[:saml_provider_sso_target_url] = value
end

#saveObject



305
306
307
308
309
310
311
312
# File 'lib/files.com/models/sso_strategy.rb', line 305

def save
  if @attributes[:id]
    update(@attributes)
  else
    new_obj = SsoStrategy.create(@attributes, @options)
    @attributes = new_obj.attributes
  end
end

#scim_authentication_methodObject

string - SCIM authentication type.



85
86
87
# File 'lib/files.com/models/sso_strategy.rb', line 85

def scim_authentication_method
  @attributes[:scim_authentication_method]
end

#scim_authentication_method=(value) ⇒ Object



89
90
91
# File 'lib/files.com/models/sso_strategy.rb', line 89

def scim_authentication_method=(value)
  @attributes[:scim_authentication_method] = value
end

#scim_passwordObject

string - Password for scim integration if using basic auth



229
230
231
# File 'lib/files.com/models/sso_strategy.rb', line 229

def scim_password
  @attributes[:scim_password]
end

#scim_password=(value) ⇒ Object



233
234
235
# File 'lib/files.com/models/sso_strategy.rb', line 233

def scim_password=(value)
  @attributes[:scim_password] = value
end

#scim_usernameObject

string - SCIM username.



94
95
96
# File 'lib/files.com/models/sso_strategy.rb', line 94

def scim_username
  @attributes[:scim_username]
end

#scim_username=(value) ⇒ Object



98
99
100
# File 'lib/files.com/models/sso_strategy.rb', line 98

def scim_username=(value)
  @attributes[:scim_username] = value
end

#subdomainObject

string - Subdomain



103
104
105
# File 'lib/files.com/models/sso_strategy.rb', line 103

def subdomain
  @attributes[:subdomain]
end

#subdomain=(value) ⇒ Object



107
108
109
# File 'lib/files.com/models/sso_strategy.rb', line 107

def subdomain=(value)
  @attributes[:subdomain] = value
end

#update(params = {}) ⇒ Object

Parameters:

provider (required) - string - One of the following: google, auth0, okta, atlassian, azure, box, dropbox, slack, ubuntu, onelogin, saml
subdomain - string - Subdomain or domain name for your auth provider.   Example: `https://[subdomain].okta.com/`
client_id - string - OAuth Client ID for your auth provider.
client_secret - string - OAuth Client Secret for your auth provider.
saml_provider_metadata_url - string - Metadata URL for the SAML identity provider
saml_provider_cert_fingerprint - string - Identity provider sha256 cert fingerprint if saml_provider_metadata_url is not available.
saml_provider_issuer_url - string - Identity provider issuer url
saml_provider_slo_target_url - string - Identity provider SLO endpoint
saml_provider_sso_target_url - string - Identity provider SSO endpoint if saml_provider_metadata_url is not available.
scim_authentication_method - string - The authentication method to use when using scim provisioning
scim_password - string - Password for scim integration if using basic auth
scim_username - string - Username for scim integration
protocol - string - SSO Protocol
provision_users - boolean - Auto-provision users?
provision_groups - boolean - Auto-provision group memberships?
provision_group_default - string - Comma-separated list of group names for groups to automatically add all auto-provisioned users to.
provision_group_exclusion - string - Comma-separated list of group names for groups (with optional wildcards) that will be excluded from auto-provisioning.
provision_group_inclusion - string - Comma-separated list of group names for groups (with optional wildcards) that will be auto-provisioned.
provision_group_required - string - Comma or newline separated list of group names (with optional wildcards) to require membership for user provisioning.
provision_attachments_permission - boolean - Provisioned users to get sharing permission?
provision_dav_permission - boolean - Provisioned users to get WebDAV permission?
provision_ftp_permission - boolean - Provisioned users to get FTP permission?
provision_sftp_permission - boolean - Provisioned users to get SFTP permission?
provision_time_zone - string - Default timezone to use for provisioned users


262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
# File 'lib/files.com/models/sso_strategy.rb', line 262

def update(params = {})
  params ||= {}
  params[:id] = @attributes[:id]
  raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
  raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
  raise InvalidParameterError.new("Bad parameter: provider must be an String") if params.dig(:provider) and !params.dig(:provider).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: subdomain must be an String") if params.dig(:subdomain) and !params.dig(:subdomain).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: client_id must be an String") if params.dig(:client_id) and !params.dig(:client_id).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: client_secret must be an String") if params.dig(:client_secret) and !params.dig(:client_secret).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: saml_provider_metadata_url must be an String") if params.dig(:saml_provider_metadata_url) and !params.dig(:saml_provider_metadata_url).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: saml_provider_cert_fingerprint must be an String") if params.dig(:saml_provider_cert_fingerprint) and !params.dig(:saml_provider_cert_fingerprint).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: saml_provider_issuer_url must be an String") if params.dig(:saml_provider_issuer_url) and !params.dig(:saml_provider_issuer_url).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: saml_provider_slo_target_url must be an String") if params.dig(:saml_provider_slo_target_url) and !params.dig(:saml_provider_slo_target_url).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: saml_provider_sso_target_url must be an String") if params.dig(:saml_provider_sso_target_url) and !params.dig(:saml_provider_sso_target_url).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: scim_authentication_method must be an String") if params.dig(:scim_authentication_method) and !params.dig(:scim_authentication_method).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: scim_password must be an String") if params.dig(:scim_password) and !params.dig(:scim_password).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: scim_username must be an String") if params.dig(:scim_username) and !params.dig(:scim_username).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: protocol must be an String") if params.dig(:protocol) and !params.dig(:protocol).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: provision_group_default must be an String") if params.dig(:provision_group_default) and !params.dig(:provision_group_default).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: provision_group_exclusion must be an String") if params.dig(:provision_group_exclusion) and !params.dig(:provision_group_exclusion).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: provision_group_inclusion must be an String") if params.dig(:provision_group_inclusion) and !params.dig(:provision_group_inclusion).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: provision_group_required must be an String") if params.dig(:provision_group_required) and !params.dig(:provision_group_required).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: provision_time_zone must be an String") if params.dig(:provision_time_zone) and !params.dig(:provision_time_zone).is_a?(String)
  raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
  raise MissingParameterError.new("Parameter missing: provider") unless params.dig(:provider)

  Api.send_request("/sso_strategies/#{@attributes[:id]}", :patch, params, @options)
end