Class: OneLogin::Api::Models::OneLoginApp

Inherits:
Object
  • Object
show all
Defined in:
lib/onelogin/api/models/onelogin_app.rb,
lib/onelogin/api/models/onelogin_app_v1.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ OneLoginApp

Returns a new instance of OneLoginApp.


15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/onelogin/api/models/onelogin_app.rb', line 15

def initialize(data)
  @name = data['name']
  @visible = data['visible']
  @policy_id = data['policy_id']? data['policy_id'].to_i : nil
  @parameters = data['parameters']
  @allow_assumed_signin = data['allow_assumed_signin']
  @configuration = data['configuration']
  @notes = data['notes']
  @description = data['description']

  @created_at = data['created_at']
  @updated_at = data['updated_at']
  @icon = data['icon_url']
  @provisioning = data['provisioning']
  @connector_id = data['connector_id']? data['connector_id'].to_i : nil
  @sso = data['sso']
  @auth_method = data['auth_method']
  @tab_id = data['tab_id']? data['tab_id'].to_i : nil
  @id = data['id']? data['id'].to_i : nil
end

Instance Attribute Details

#allow_assumed_signinObject

Returns the value of attribute allow_assumed_signin.


7
8
9
# File 'lib/onelogin/api/models/onelogin_app.rb', line 7

def 
  @allow_assumed_signin
end

#auth_methodObject (readonly)

Returns the value of attribute auth_method.


12
13
14
# File 'lib/onelogin/api/models/onelogin_app.rb', line 12

def auth_method
  @auth_method
end

#configurationObject

Returns the value of attribute configuration.


7
8
9
# File 'lib/onelogin/api/models/onelogin_app.rb', line 7

def configuration
  @configuration
end

#connector_idObject

Returns the value of attribute connector_id.


12
13
14
# File 'lib/onelogin/api/models/onelogin_app.rb', line 12

def connector_id
  @connector_id
end

#created_atObject (readonly)

Returns the value of attribute created_at.


12
13
14
# File 'lib/onelogin/api/models/onelogin_app.rb', line 12

def created_at
  @created_at
end

#descriptionObject

Returns the value of attribute description.


7
8
9
# File 'lib/onelogin/api/models/onelogin_app.rb', line 7

def description
  @description
end

#extensionObject

Returns the value of attribute extension.


7
8
9
# File 'lib/onelogin/api/models/onelogin_app_v1.rb', line 7

def extension
  @extension
end

#iconObject

Returns the value of attribute icon.


12
13
14
# File 'lib/onelogin/api/models/onelogin_app.rb', line 12

def icon
  @icon
end

#idObject

Returns the value of attribute id.


12
13
14
# File 'lib/onelogin/api/models/onelogin_app.rb', line 12

def id
  @id
end

#is_availableObject

Returns the value of attribute is_available.


7
8
9
# File 'lib/onelogin/api/models/onelogin_app.rb', line 7

def is_available
  @is_available
end

#nameObject

Returns the value of attribute name.


7
8
9
# File 'lib/onelogin/api/models/onelogin_app.rb', line 7

def name
  @name
end

#notesObject

Returns the value of attribute notes.


7
8
9
# File 'lib/onelogin/api/models/onelogin_app.rb', line 7

def notes
  @notes
end

#parametersObject

Returns the value of attribute parameters.


7
8
9
# File 'lib/onelogin/api/models/onelogin_app.rb', line 7

def parameters
  @parameters
end

#policy_idObject

Returns the value of attribute policy_id.


7
8
9
# File 'lib/onelogin/api/models/onelogin_app.rb', line 7

def policy_id
  @policy_id
end

#provisioningObject

Returns the value of attribute provisioning.


12
13
14
# File 'lib/onelogin/api/models/onelogin_app.rb', line 12

def provisioning
  @provisioning
end

#ssoObject (readonly)

Returns the value of attribute sso.


12
13
14
# File 'lib/onelogin/api/models/onelogin_app.rb', line 12

def sso
  @sso
end

#tab_idObject (readonly)

Returns the value of attribute tab_id.


12
13
14
# File 'lib/onelogin/api/models/onelogin_app.rb', line 12

def tab_id
  @tab_id
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.


12
13
14
# File 'lib/onelogin/api/models/onelogin_app.rb', line 12

def updated_at
  @updated_at
end

#visibleObject

Returns the value of attribute visible.


7
8
9
# File 'lib/onelogin/api/models/onelogin_app.rb', line 7

def visible
  @visible
end

Instance Method Details

#get_auth_method_nameObject


36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/onelogin/api/models/onelogin_app.rb', line 36

def get_auth_method_name
  auth_method_name = nil
  case @auth_method
  when 0
    auth_method_name = "PASSWORD"
  when 1
    auth_method_name = "OPENID"
  when 2
    auth_method_name = "SAML"
  when 3
    auth_method_name = "API"
  when 4
    auth_method_name = "GOOGLE"
  when 6
    auth_method_name = "BASIC_AUTH"
  when 7
    auth_method_name = "WSFED"
  when 8
    auth_method_name = "OIDC"
  end

  auth_method_name
end