Class: Files::SsoStrategy
- Inherits:
-
Object
- Object
- Files::SsoStrategy
- Defined in:
- lib/files.com/models/sso_strategy.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
- .all(params = {}, options = {}) ⇒ Object
-
.find(id, params = {}, options = {}) ⇒ Object
Parameters: id (required) - int64 - Sso Strategy ID.
- .get(id, params = {}, options = {}) ⇒ Object
-
.list(params = {}, options = {}) ⇒ Object
Parameters: cursor - string - Used for pagination.
-
.sync(id, params = {}, options = {}) ⇒ Object
Synchronize provisioning data with the SSO remote server.
Instance Method Summary collapse
-
#deprovision_behavior ⇒ Object
string - Method used for deprovisioning users.
-
#deprovision_groups ⇒ Object
boolean - Auto-deprovision group membership based on group memberships on the SSO side?.
-
#deprovision_users ⇒ Object
boolean - Auto-deprovision users?.
-
#enabled ⇒ Object
boolean - Is strategy enabled? This may become automatically set to ‘false` after a high number and duration of failures.
-
#id ⇒ Object
int64 - ID.
-
#initialize(attributes = {}, options = {}) ⇒ SsoStrategy
constructor
A new instance of SsoStrategy.
-
#label ⇒ Object
string - Custom label for the SSO provider on the login page.
-
#ldap_base_dn ⇒ Object
string - Base DN for looking up users in LDAP server.
-
#ldap_domain ⇒ Object
string - Domain name that will be appended to LDAP usernames.
-
#ldap_host ⇒ Object
string - LDAP host.
-
#ldap_host_2 ⇒ Object
string - LDAP backup host.
-
#ldap_host_3 ⇒ Object
string - LDAP backup host.
-
#ldap_port ⇒ Object
int64 - LDAP port.
-
#ldap_secure ⇒ Object
boolean - Use secure LDAP?.
-
#ldap_username ⇒ Object
string - Username for signing in to LDAP server.
-
#ldap_username_field ⇒ Object
string - LDAP username field.
-
#logo_url ⇒ Object
string - URL holding a custom logo for the SSO provider on the login page.
-
#protocol ⇒ Object
string - SSO Protocol.
-
#provider ⇒ Object
string - Provider name.
-
#provision_attachments_permission ⇒ Object
boolean - DEPRECATED: Auto-provisioned users get Sharing permission.
-
#provision_company ⇒ Object
string - Default company for auto provisioned users.
-
#provision_dav_permission ⇒ Object
boolean - Auto-provisioned users get WebDAV permission?.
-
#provision_email_signup_groups ⇒ Object
string - Comma-separated list of group names whose members will be created with email_signup authentication.
-
#provision_ftp_permission ⇒ Object
boolean - Auto-provisioned users get FTP permission?.
-
#provision_group_default ⇒ Object
string - Comma-separated list of group names for groups to automatically add all auto-provisioned users to.
-
#provision_group_exclusion ⇒ Object
string - Comma-separated list of group names for groups (with optional wildcards) that will be excluded from auto-provisioning.
-
#provision_group_inclusion ⇒ Object
string - Comma-separated list of group names for groups (with optional wildcards) that will be auto-provisioned.
-
#provision_group_required ⇒ Object
string - Comma or newline separated list of group names (with optional wildcards) to require membership for user provisioning.
-
#provision_groups ⇒ Object
boolean - Auto-provision group membership based on group memberships on the SSO side?.
-
#provision_sftp_permission ⇒ Object
boolean - Auto-provisioned users get SFTP permission?.
-
#provision_site_admin_groups ⇒ Object
string - Comma-separated list of group names whose members will be created as Site Admins.
-
#provision_time_zone ⇒ Object
string - Default time zone for auto provisioned users.
-
#provision_users ⇒ Object
boolean - Auto-provision users?.
-
#saml_provider_cert_fingerprint ⇒ Object
string - Identity provider sha256 cert fingerprint if saml_provider_metadata_url is not available.
-
#saml_provider_issuer_url ⇒ Object
string - Identity provider issuer url.
-
#saml_provider_metadata_content ⇒ Object
string - Custom identity provider metadata.
-
#saml_provider_metadata_url ⇒ Object
string - Metadata URL for the SAML identity provider.
-
#saml_provider_slo_target_url ⇒ Object
string - Identity provider SLO endpoint.
-
#saml_provider_sso_target_url ⇒ Object
string - Identity provider SSO endpoint if saml_provider_metadata_url is not available.
-
#scim_authentication_method ⇒ Object
string - SCIM authentication type.
-
#scim_oauth_access_token ⇒ Object
string - SCIM OAuth Access Token.
-
#scim_oauth_access_token_expires_at ⇒ Object
string - SCIM OAuth Access Token Expiration Time.
-
#scim_username ⇒ Object
string - SCIM username.
-
#subdomain ⇒ Object
string - Subdomain.
-
#sync(params = {}) ⇒ Object
Synchronize provisioning data with the SSO remote server.
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 = {}, = {}) @attributes = attributes || {} @options = || {} end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
5 6 7 |
# File 'lib/files.com/models/sso_strategy.rb', line 5 def attributes @attributes end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/files.com/models/sso_strategy.rb', line 5 def @options end |
Class Method Details
.all(params = {}, options = {}) ⇒ Object
250 251 252 |
# File 'lib/files.com/models/sso_strategy.rb', line 250 def self.all(params = {}, = {}) list(params, ) end |
.find(id, params = {}, options = {}) ⇒ Object
Parameters:
id (required) - int64 - Sso Strategy ID.
256 257 258 259 260 261 262 263 264 |
# File 'lib/files.com/models/sso_strategy.rb', line 256 def self.find(id, params = {}, = {}) 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, = Api.send_request("/sso_strategies/#{params[:id]}", :get, params, ) SsoStrategy.new(response.data, ) end |
.get(id, params = {}, options = {}) ⇒ Object
266 267 268 |
# File 'lib/files.com/models/sso_strategy.rb', line 266 def self.get(id, params = {}, = {}) find(id, params, ) 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).
241 242 243 244 245 246 247 248 |
# File 'lib/files.com/models/sso_strategy.rb', line 241 def self.list(params = {}, = {}) 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, ) end end |
.sync(id, params = {}, options = {}) ⇒ Object
Synchronize provisioning data with the SSO remote server
271 272 273 274 275 276 277 278 279 |
# File 'lib/files.com/models/sso_strategy.rb', line 271 def self.sync(id, params = {}, = {}) 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, = Api.send_request("/sso_strategies/#{params[:id]}/sync", :post, params, ) response.data end |
Instance Method Details
#deprovision_behavior ⇒ Object
string - Method used for deprovisioning users.
113 114 115 |
# File 'lib/files.com/models/sso_strategy.rb', line 113 def deprovision_behavior @attributes[:deprovision_behavior] end |
#deprovision_groups ⇒ Object
boolean - Auto-deprovision group membership based on group memberships on the SSO side?
108 109 110 |
# File 'lib/files.com/models/sso_strategy.rb', line 108 def deprovision_groups @attributes[:deprovision_groups] end |
#deprovision_users ⇒ Object
boolean - Auto-deprovision users?
103 104 105 |
# File 'lib/files.com/models/sso_strategy.rb', line 103 def deprovision_users @attributes[:deprovision_users] end |
#enabled ⇒ Object
boolean - Is strategy enabled? This may become automatically set to ‘false` after a high number and duration of failures.
188 189 190 |
# File 'lib/files.com/models/sso_strategy.rb', line 188 def enabled @attributes[:enabled] end |
#id ⇒ Object
int64 - ID
33 34 35 |
# File 'lib/files.com/models/sso_strategy.rb', line 33 def id @attributes[:id] end |
#label ⇒ Object
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_dn ⇒ Object
string - Base DN for looking up users in LDAP server
178 179 180 |
# File 'lib/files.com/models/sso_strategy.rb', line 178 def ldap_base_dn @attributes[:ldap_base_dn] end |
#ldap_domain ⇒ Object
string - Domain name that will be appended to LDAP usernames
183 184 185 |
# File 'lib/files.com/models/sso_strategy.rb', line 183 def ldap_domain @attributes[:ldap_domain] end |
#ldap_host ⇒ Object
string - LDAP host
193 194 195 |
# File 'lib/files.com/models/sso_strategy.rb', line 193 def ldap_host @attributes[:ldap_host] end |
#ldap_host_2 ⇒ Object
string - LDAP backup host
198 199 200 |
# File 'lib/files.com/models/sso_strategy.rb', line 198 def ldap_host_2 @attributes[:ldap_host_2] end |
#ldap_host_3 ⇒ Object
string - LDAP backup host
203 204 205 |
# File 'lib/files.com/models/sso_strategy.rb', line 203 def ldap_host_3 @attributes[:ldap_host_3] end |
#ldap_port ⇒ Object
int64 - LDAP port
208 209 210 |
# File 'lib/files.com/models/sso_strategy.rb', line 208 def ldap_port @attributes[:ldap_port] end |
#ldap_secure ⇒ Object
boolean - Use secure LDAP?
213 214 215 |
# File 'lib/files.com/models/sso_strategy.rb', line 213 def ldap_secure @attributes[:ldap_secure] end |
#ldap_username ⇒ Object
string - Username for signing in to LDAP server.
218 219 220 |
# File 'lib/files.com/models/sso_strategy.rb', line 218 def ldap_username @attributes[:ldap_username] end |
#ldap_username_field ⇒ Object
string - LDAP username field
223 224 225 |
# File 'lib/files.com/models/sso_strategy.rb', line 223 def ldap_username_field @attributes[:ldap_username_field] end |
#logo_url ⇒ Object
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 |
#protocol ⇒ Object
string - SSO Protocol
13 14 15 |
# File 'lib/files.com/models/sso_strategy.rb', line 13 def protocol @attributes[:protocol] end |
#provider ⇒ Object
string - Provider name
18 19 20 |
# File 'lib/files.com/models/sso_strategy.rb', line 18 def provider @attributes[:provider] end |
#provision_attachments_permission ⇒ Object
boolean - DEPRECATED: Auto-provisioned users get Sharing permission. Use a Group with the Bundle permission instead.
148 149 150 |
# File 'lib/files.com/models/sso_strategy.rb', line 148 def @attributes[:provision_attachments_permission] end |
#provision_company ⇒ Object
string - Default company for auto provisioned users.
173 174 175 |
# File 'lib/files.com/models/sso_strategy.rb', line 173 def provision_company @attributes[:provision_company] end |
#provision_dav_permission ⇒ Object
boolean - Auto-provisioned users get WebDAV permission?
153 154 155 |
# File 'lib/files.com/models/sso_strategy.rb', line 153 def @attributes[:provision_dav_permission] end |
#provision_email_signup_groups ⇒ Object
string - Comma-separated list of group names whose members will be created with email_signup authentication.
138 139 140 |
# File 'lib/files.com/models/sso_strategy.rb', line 138 def provision_email_signup_groups @attributes[:provision_email_signup_groups] end |
#provision_ftp_permission ⇒ Object
boolean - Auto-provisioned users get FTP permission?
158 159 160 |
# File 'lib/files.com/models/sso_strategy.rb', line 158 def @attributes[:provision_ftp_permission] end |
#provision_group_default ⇒ Object
string - Comma-separated list of group names for groups to automatically add all auto-provisioned users to.
118 119 120 |
# File 'lib/files.com/models/sso_strategy.rb', line 118 def provision_group_default @attributes[:provision_group_default] end |
#provision_group_exclusion ⇒ Object
string - Comma-separated list of group names for groups (with optional wildcards) that will be excluded from auto-provisioning.
123 124 125 |
# File 'lib/files.com/models/sso_strategy.rb', line 123 def provision_group_exclusion @attributes[:provision_group_exclusion] end |
#provision_group_inclusion ⇒ Object
string - Comma-separated list of group names for groups (with optional wildcards) that will be auto-provisioned.
128 129 130 |
# File 'lib/files.com/models/sso_strategy.rb', line 128 def provision_group_inclusion @attributes[:provision_group_inclusion] end |
#provision_group_required ⇒ Object
string - Comma or newline separated list of group names (with optional wildcards) to require membership for user provisioning.
133 134 135 |
# File 'lib/files.com/models/sso_strategy.rb', line 133 def provision_group_required @attributes[:provision_group_required] end |
#provision_groups ⇒ Object
boolean - Auto-provision group membership based on group memberships on the SSO side?
98 99 100 |
# File 'lib/files.com/models/sso_strategy.rb', line 98 def provision_groups @attributes[:provision_groups] end |
#provision_sftp_permission ⇒ Object
boolean - Auto-provisioned users get SFTP permission?
163 164 165 |
# File 'lib/files.com/models/sso_strategy.rb', line 163 def @attributes[:provision_sftp_permission] end |
#provision_site_admin_groups ⇒ Object
string - Comma-separated list of group names whose members will be created as Site Admins.
143 144 145 |
# File 'lib/files.com/models/sso_strategy.rb', line 143 def provision_site_admin_groups @attributes[:provision_site_admin_groups] end |
#provision_time_zone ⇒ Object
string - Default time zone for auto provisioned users.
168 169 170 |
# File 'lib/files.com/models/sso_strategy.rb', line 168 def provision_time_zone @attributes[:provision_time_zone] end |
#provision_users ⇒ Object
boolean - Auto-provision users?
93 94 95 |
# File 'lib/files.com/models/sso_strategy.rb', line 93 def provision_users @attributes[:provision_users] end |
#saml_provider_cert_fingerprint ⇒ Object
string - Identity provider sha256 cert fingerprint if saml_provider_metadata_url is not available.
38 39 40 |
# File 'lib/files.com/models/sso_strategy.rb', line 38 def saml_provider_cert_fingerprint @attributes[:saml_provider_cert_fingerprint] end |
#saml_provider_issuer_url ⇒ Object
string - Identity provider issuer url
43 44 45 |
# File 'lib/files.com/models/sso_strategy.rb', line 43 def saml_provider_issuer_url @attributes[:saml_provider_issuer_url] end |
#saml_provider_metadata_content ⇒ Object
string - Custom identity provider metadata
48 49 50 |
# File 'lib/files.com/models/sso_strategy.rb', line 48 def @attributes[:saml_provider_metadata_content] end |
#saml_provider_metadata_url ⇒ Object
string - Metadata URL for the SAML identity provider
53 54 55 |
# File 'lib/files.com/models/sso_strategy.rb', line 53 def @attributes[:saml_provider_metadata_url] end |
#saml_provider_slo_target_url ⇒ Object
string - Identity provider SLO endpoint
58 59 60 |
# File 'lib/files.com/models/sso_strategy.rb', line 58 def saml_provider_slo_target_url @attributes[:saml_provider_slo_target_url] end |
#saml_provider_sso_target_url ⇒ Object
string - Identity provider SSO endpoint if saml_provider_metadata_url is not available.
63 64 65 |
# File 'lib/files.com/models/sso_strategy.rb', line 63 def saml_provider_sso_target_url @attributes[:saml_provider_sso_target_url] end |
#scim_authentication_method ⇒ Object
string - SCIM authentication type.
68 69 70 |
# File 'lib/files.com/models/sso_strategy.rb', line 68 def scim_authentication_method @attributes[:scim_authentication_method] end |
#scim_oauth_access_token ⇒ Object
string - SCIM OAuth Access Token.
78 79 80 |
# File 'lib/files.com/models/sso_strategy.rb', line 78 def scim_oauth_access_token @attributes[:scim_oauth_access_token] end |
#scim_oauth_access_token_expires_at ⇒ Object
string - SCIM OAuth Access Token Expiration Time.
83 84 85 |
# File 'lib/files.com/models/sso_strategy.rb', line 83 def scim_oauth_access_token_expires_at @attributes[:scim_oauth_access_token_expires_at] end |
#scim_username ⇒ Object
string - SCIM username.
73 74 75 |
# File 'lib/files.com/models/sso_strategy.rb', line 73 def scim_username @attributes[:scim_username] end |
#subdomain ⇒ Object
string - Subdomain
88 89 90 |
# File 'lib/files.com/models/sso_strategy.rb', line 88 def subdomain @attributes[:subdomain] end |
#sync(params = {}) ⇒ Object
Synchronize provisioning data with the SSO remote server
228 229 230 231 232 233 234 235 236 |
# File 'lib/files.com/models/sso_strategy.rb', line 228 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 |