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



265
266
267
# File 'lib/files.com/models/sso_strategy.rb', line 265

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

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

Parameters:

id (required) - int64 - Sso Strategy ID.


271
272
273
274
275
276
277
278
279
# File 'lib/files.com/models/sso_strategy.rb', line 271

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

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

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



281
282
283
# File 'lib/files.com/models/sso_strategy.rb', line 281

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

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

Parameters:

cursor - string - Used for pagination.  When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`.  Send one of those cursor value here to resume an existing list from the next available record.  Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
per_page - int64 - Number of records to show per page.  (Max: 10,000, 1,000 or less is recommended).


256
257
258
259
260
261
262
263
# File 'lib/files.com/models/sso_strategy.rb', line 256

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

  List.new(SsoStrategy, params) do
    Api.send_request("/sso_strategies", :get, params, options)
  end
end

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

Synchronize provisioning data with the SSO remote server



286
287
288
289
290
291
292
293
294
# File 'lib/files.com/models/sso_strategy.rb', line 286

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

  Api.send_request("/sso_strategies/#{params[:id]}/sync", :post, params, options)
  nil
end

Instance Method Details

#deprovision_behaviorObject

string - Method used for deprovisioning users.



118
119
120
# File 'lib/files.com/models/sso_strategy.rb', line 118

def deprovision_behavior
  @attributes[:deprovision_behavior]
end

#deprovision_groupsObject

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



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

def deprovision_groups
  @attributes[:deprovision_groups]
end

#deprovision_usersObject

boolean - Auto-deprovision users?



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

def deprovision_users
  @attributes[:deprovision_users]
end

#enabledObject

boolean - Is strategy enabled? This may become automatically set to ‘false` after a high number and duration of failures.



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

def enabled
  @attributes[:enabled]
end

#idObject

int64 - ID



33
34
35
# File 'lib/files.com/models/sso_strategy.rb', line 33

def id
  @attributes[:id]
end

#labelObject

string - Custom label for the SSO provider on the login page.



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

def label
  @attributes[:label]
end

#ldap_base_dnObject

string - Base DN for looking up users in LDAP server



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

def ldap_base_dn
  @attributes[:ldap_base_dn]
end

#ldap_domainObject

string - Domain name that will be appended to LDAP usernames



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

def ldap_domain
  @attributes[:ldap_domain]
end

#ldap_hostObject

string - LDAP host



208
209
210
# File 'lib/files.com/models/sso_strategy.rb', line 208

def ldap_host
  @attributes[:ldap_host]
end

#ldap_host_2Object

string - LDAP backup host



213
214
215
# File 'lib/files.com/models/sso_strategy.rb', line 213

def ldap_host_2
  @attributes[:ldap_host_2]
end

#ldap_host_3Object

string - LDAP backup host



218
219
220
# File 'lib/files.com/models/sso_strategy.rb', line 218

def ldap_host_3
  @attributes[:ldap_host_3]
end

#ldap_portObject

int64 - LDAP port



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

def ldap_port
  @attributes[:ldap_port]
end

#ldap_secureObject

boolean - Use secure LDAP?



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

def ldap_secure
  @attributes[:ldap_secure]
end

#ldap_usernameObject

string - Username for signing in to LDAP server.



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

def ldap_username
  @attributes[:ldap_username]
end

#ldap_username_fieldObject

string - LDAP username field



238
239
240
# File 'lib/files.com/models/sso_strategy.rb', line 238

def ldap_username_field
  @attributes[:ldap_username_field]
end

#logo_urlObject

string - URL holding a custom logo for the SSO provider on the login page.



28
29
30
# File 'lib/files.com/models/sso_strategy.rb', line 28

def logo_url
  @attributes[:logo_url]
end

#protocolObject

string - SSO Protocol



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

def protocol
  @attributes[:protocol]
end

#providerObject

string - Provider name



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

def provider
  @attributes[:provider]
end

#provision_attachments_permissionObject

boolean - DEPRECATED: Auto-provisioned users get Sharing permission. Use a Group with the Bundle permission instead.



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

def provision_attachments_permission
  @attributes[:provision_attachments_permission]
end

#provision_companyObject

string - Default company for auto provisioned users.



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

def provision_company
  @attributes[:provision_company]
end

#provision_dav_permissionObject

boolean - Auto-provisioned users get WebDAV permission?



163
164
165
# File 'lib/files.com/models/sso_strategy.rb', line 163

def provision_dav_permission
  @attributes[:provision_dav_permission]
end

#provision_email_signup_groupsObject

string - Comma-separated list of group names whose members will be created with email_signup authentication.



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

def 
  @attributes[:provision_email_signup_groups]
end

#provision_ftp_permissionObject

boolean - Auto-provisioned users get FTP permission?



168
169
170
# File 'lib/files.com/models/sso_strategy.rb', line 168

def provision_ftp_permission
  @attributes[:provision_ftp_permission]
end

#provision_group_admin_groupsObject

string - Comma-separated list of group names whose members will be provisioned as Group Admins.



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

def provision_group_admin_groups
  @attributes[:provision_group_admin_groups]
end

#provision_group_defaultObject

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



123
124
125
# File 'lib/files.com/models/sso_strategy.rb', line 123

def provision_group_default
  @attributes[:provision_group_default]
end

#provision_group_exclusionObject

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



128
129
130
# File 'lib/files.com/models/sso_strategy.rb', line 128

def provision_group_exclusion
  @attributes[:provision_group_exclusion]
end

#provision_group_inclusionObject

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



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

def provision_group_inclusion
  @attributes[:provision_group_inclusion]
end

#provision_group_requiredObject

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



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

def provision_group_required
  @attributes[:provision_group_required]
end

#provision_groupsObject

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



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

def provision_groups
  @attributes[:provision_groups]
end

#provision_require_2faObject

string - 2FA required setting for auto provisioned users.



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

def provision_require_2fa
  @attributes[:provision_require_2fa]
end

#provision_sftp_permissionObject

boolean - Auto-provisioned users get SFTP permission?



173
174
175
# File 'lib/files.com/models/sso_strategy.rb', line 173

def provision_sftp_permission
  @attributes[:provision_sftp_permission]
end

#provision_site_admin_groupsObject

string - Comma-separated list of group names whose members will be created as Site Admins.



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

def provision_site_admin_groups
  @attributes[:provision_site_admin_groups]
end

#provision_time_zoneObject

string - Default time zone for auto provisioned users.



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

def provision_time_zone
  @attributes[:provision_time_zone]
end

#provision_usersObject

boolean - Auto-provision users?



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

def provision_users
  @attributes[:provision_users]
end

#saml_provider_cert_fingerprintObject

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



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

def saml_provider_cert_fingerprint
  @attributes[:saml_provider_cert_fingerprint]
end

#saml_provider_issuer_urlObject

string - Identity provider issuer url



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

def saml_provider_issuer_url
  @attributes[:saml_provider_issuer_url]
end

#saml_provider_metadata_contentObject

string - Custom identity provider metadata



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

def 
  @attributes[:saml_provider_metadata_content]
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_slo_target_urlObject

string - Identity provider SLO endpoint



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

def saml_provider_slo_target_url
  @attributes[:saml_provider_slo_target_url]
end

#saml_provider_sso_target_urlObject

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



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

def saml_provider_sso_target_url
  @attributes[:saml_provider_sso_target_url]
end

#scim_authentication_methodObject

string - SCIM authentication type.



73
74
75
# File 'lib/files.com/models/sso_strategy.rb', line 73

def scim_authentication_method
  @attributes[:scim_authentication_method]
end

#scim_oauth_access_tokenObject

string - SCIM OAuth Access Token.



83
84
85
# File 'lib/files.com/models/sso_strategy.rb', line 83

def scim_oauth_access_token
  @attributes[:scim_oauth_access_token]
end

#scim_oauth_access_token_expires_atObject

string - SCIM OAuth Access Token Expiration Time.



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

def scim_oauth_access_token_expires_at
  @attributes[:scim_oauth_access_token_expires_at]
end

#scim_usernameObject

string - SCIM username.



78
79
80
# File 'lib/files.com/models/sso_strategy.rb', line 78

def scim_username
  @attributes[:scim_username]
end

#subdomainObject

string - Subdomain



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

def subdomain
  @attributes[:subdomain]
end

#sync(params = {}) ⇒ Object

Synchronize provisioning data with the SSO remote server



243
244
245
246
247
248
249
250
251
# File 'lib/files.com/models/sso_strategy.rb', line 243

def sync(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[:id] and !params[:id].is_a?(Integer)
  raise MissingParameterError.new("Parameter missing: id") unless params[:id]

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

#user_countObject

int64 - Count of users with this SSO Strategy



38
39
40
# File 'lib/files.com/models/sso_strategy.rb', line 38

def user_count
  @attributes[:user_count]
end