login_radius 11.0.0 → 11.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +21 -21
  3. data/README.md +58 -58
  4. data/lib/login_radius/api/account/account_api.rb +581 -581
  5. data/lib/login_radius/api/account/role_api.rb +330 -330
  6. data/lib/login_radius/api/account/sott_api.rb +47 -47
  7. data/lib/login_radius/api/advanced/configuration_api.rb +57 -57
  8. data/lib/login_radius/api/advanced/consent_management_api.rb +161 -161
  9. data/lib/login_radius/api/advanced/custom_object_api.rb +316 -316
  10. data/lib/login_radius/api/advanced/custom_registration_data_api.rb +195 -195
  11. data/lib/login_radius/api/advanced/multi_factor_authentication_api.rb +942 -606
  12. data/lib/login_radius/api/advanced/re_authentication_api.rb +317 -243
  13. data/lib/login_radius/api/advanced/web_hook_api.rb +101 -101
  14. data/lib/login_radius/api/authentication/authentication_api.rb +1036 -989
  15. data/lib/login_radius/api/authentication/one_touch_login_api.rb +160 -160
  16. data/lib/login_radius/api/authentication/password_less_login_api.rb +202 -158
  17. data/lib/login_radius/api/authentication/phone_authentication_api.rb +329 -329
  18. data/lib/login_radius/api/authentication/pin_authentication_api.rb +316 -316
  19. data/lib/login_radius/api/authentication/risk_based_authentication_api.rb +286 -286
  20. data/lib/login_radius/api/authentication/smart_login_api.rb +146 -146
  21. data/lib/login_radius/api/social/native_social_api.rb +255 -255
  22. data/lib/login_radius/api/social/social_api.rb +784 -806
  23. data/lib/login_radius/error.rb +7 -7
  24. data/lib/login_radius/request_client.rb +311 -295
  25. data/lib/login_radius/response.rb +18 -12
  26. data/lib/login_radius/version.rb +2 -2
  27. data/lib/login_radius.rb +30 -30
  28. data/login_radius.gemspec +25 -28
  29. metadata +7 -7
@@ -1,195 +1,195 @@
1
- # frozen_string_literal: true
2
-
3
- # Created by LoginRadius Development Team
4
- # Copyright 2019 LoginRadius Inc. All rights reserved.
5
- require_relative '../../request_client'
6
-
7
- module LoginRadius
8
- # CustomRegistrationDataApi module
9
- class CustomRegistrationDataApi
10
- include RequestClient
11
-
12
- attr_accessor :site_name, :api_key, :api_secret
13
-
14
- # Initializes a LoginRadius Account object with an apikey and secret
15
- # Takes in a hash containing site_name(required), api_key(required), api_secret(required)
16
- def initialize
17
- @site_name = ENV['SITE_NAME']
18
- @api_key = ENV['API_KEY']
19
- @api_secret = ENV['API_SECRET']
20
- raise LoginRadius::Error.new, "'site_name' is a required option for Account class initialization." \
21
- unless @site_name != '' && @site_name != nil
22
- raise LoginRadius::Error.new, "'api_key' is a required option for Account class initialization." \
23
- unless @api_key != '' && @api_key != nil
24
- raise LoginRadius::Error.new, "'api_secret is a required option for Account class initialization." \
25
- unless @api_secret != '' && @api_secret != nil
26
- end
27
-
28
- # This API is used to retrieve dropdown data.
29
- #
30
- # @param type - Type of the Datasource
31
- # @param limit - Retrieve number of records at a time(max limit is 50)
32
- # @param parent_id - Id of parent dropdown member(if any).
33
- # @param skip - Skip number of records from start
34
- #
35
- # @return Complete user Registration data
36
- # 7.1
37
- def auth_get_registration_data(type, limit = '', parent_id = '', skip = '')
38
- if isNullOrWhiteSpace(type)
39
- raise LoginRadius::Error.new, getValidationMessage('type')
40
- end
41
-
42
- query_parameters = {}
43
- query_parameters['apiKey'] = @api_key
44
- unless limit == false
45
- query_parameters['limit'] = limit
46
- end
47
- unless isNullOrWhiteSpace(parent_id)
48
- query_parameters['parentId'] = parent_id
49
- end
50
- unless skip == false
51
- query_parameters['skip'] = skip
52
- end
53
-
54
- resource_path = 'identity/v2/auth/registrationdata/' + type
55
- get_request(resource_path, query_parameters, nil)
56
- end
57
-
58
- # This API allows you to validate code for a particular dropdown member.
59
- #
60
- # @param code - Secret Code
61
- # @param record_id - Selected dropdown item’s record id
62
- #
63
- # @return Response containing Definition of Complete Validation data
64
- # 7.2
65
- def validate_registration_data_code(code, record_id)
66
- if isNullOrWhiteSpace(code)
67
- raise LoginRadius::Error.new, getValidationMessage('code')
68
- end
69
- if isNullOrWhiteSpace(record_id)
70
- raise LoginRadius::Error.new, getValidationMessage('record_id')
71
- end
72
-
73
- query_parameters = {}
74
- query_parameters['apiKey'] = @api_key
75
-
76
- body_parameters = {}
77
- body_parameters['code'] = code
78
- body_parameters['recordId'] = record_id
79
-
80
- resource_path = 'identity/v2/auth/registrationdata/validatecode'
81
- post_request(resource_path, query_parameters, body_parameters)
82
- end
83
-
84
- # This API is used to retrieve dropdown data.
85
- #
86
- # @param type - Type of the Datasource
87
- # @param limit - Retrive number of records at a time(max limit is 50
88
- # @param parent_id - Id of parent dropdown member(if any).
89
- # @param skip - Skip number of records from start
90
- #
91
- # @return Complete user Registration data Fields
92
- # 16.1
93
- def get_registration_data(type, limit = '', parent_id = '', skip = '')
94
- if isNullOrWhiteSpace(type)
95
- raise LoginRadius::Error.new, getValidationMessage('type')
96
- end
97
-
98
- query_parameters = {}
99
- query_parameters['apiKey'] = @api_key
100
- query_parameters['apiSecret'] = @api_secret
101
- unless limit == false
102
- query_parameters['limit'] = limit
103
- end
104
- unless isNullOrWhiteSpace(parent_id)
105
- query_parameters['parentId'] = parent_id
106
- end
107
- unless skip == false
108
- query_parameters['skip'] = skip
109
- end
110
-
111
- resource_path = 'identity/v2/manage/registrationdata/' + type
112
- get_request(resource_path, query_parameters, nil)
113
- end
114
-
115
- # This API allows you to fill data into a dropdown list which you have created for user Registration. For more details on how to use this API please see our Custom Registration Data Overview
116
- #
117
- # @param registration_data_create_model_list - Model Class containing Definition of List of Registration Data
118
- #
119
- # @return Response containing Definition of Complete Validation data
120
- # 16.2
121
- def add_registration_data(registration_data_create_model_list)
122
- if registration_data_create_model_list.blank?
123
- raise LoginRadius::Error.new, getValidationMessage('registration_data_create_model_list')
124
- end
125
-
126
- query_parameters = {}
127
- query_parameters['apiKey'] = @api_key
128
- query_parameters['apiSecret'] = @api_secret
129
-
130
- resource_path = 'identity/v2/manage/registrationdata'
131
- post_request(resource_path, query_parameters, registration_data_create_model_list)
132
- end
133
-
134
- # This API allows you to update a dropdown item
135
- #
136
- # @param registration_data_update_model - Model Class containing Definition of payload for Registration Data update API
137
- # @param record_id - Registration data RecordId
138
- #
139
- # @return Complete user Registration data Field
140
- # 16.3
141
- def update_registration_data(registration_data_update_model, record_id)
142
- if registration_data_update_model.blank?
143
- raise LoginRadius::Error.new, getValidationMessage('registration_data_update_model')
144
- end
145
- if isNullOrWhiteSpace(record_id)
146
- raise LoginRadius::Error.new, getValidationMessage('record_id')
147
- end
148
-
149
- query_parameters = {}
150
- query_parameters['apiKey'] = @api_key
151
- query_parameters['apiSecret'] = @api_secret
152
-
153
- resource_path = 'identity/v2/manage/registrationdata/' + record_id
154
- put_request(resource_path, query_parameters, registration_data_update_model)
155
- end
156
-
157
- # This API allows you to delete an item from a dropdown list.
158
- #
159
- # @param record_id - Registration data RecordId
160
- #
161
- # @return Response containing Definition of Delete Request
162
- # 16.4
163
- def delete_registration_data(record_id)
164
- if isNullOrWhiteSpace(record_id)
165
- raise LoginRadius::Error.new, getValidationMessage('record_id')
166
- end
167
-
168
- query_parameters = {}
169
- query_parameters['apiKey'] = @api_key
170
- query_parameters['apiSecret'] = @api_secret
171
-
172
- resource_path = 'identity/v2/manage/registrationdata/' + record_id
173
- delete_request(resource_path, query_parameters, nil)
174
- end
175
-
176
- # This API allows you to delete all records contained in a datasource.
177
- #
178
- # @param type - Type of the Datasource
179
- #
180
- # @return Response containing Definition of Delete Request
181
- # 16.5
182
- def delete_all_records_by_data_source(type)
183
- if isNullOrWhiteSpace(type)
184
- raise LoginRadius::Error.new, getValidationMessage('type')
185
- end
186
-
187
- query_parameters = {}
188
- query_parameters['apiKey'] = @api_key
189
- query_parameters['apiSecret'] = @api_secret
190
-
191
- resource_path = 'identity/v2/manage/registrationdata/type/' + type
192
- delete_request(resource_path, query_parameters, nil)
193
- end
194
- end
195
- end
1
+ # frozen_string_literal: true
2
+
3
+ # Created by LoginRadius Development Team
4
+ # Copyright 2019 LoginRadius Inc. All rights reserved.
5
+ require_relative '../../request_client'
6
+
7
+ module LoginRadius
8
+ # CustomRegistrationDataApi module
9
+ class CustomRegistrationDataApi
10
+ include RequestClient
11
+
12
+ attr_accessor :site_name, :api_key, :api_secret
13
+
14
+ # Initializes a LoginRadius Account object with an apikey and secret
15
+ # Takes in a hash containing site_name(required), api_key(required), api_secret(required)
16
+ def initialize
17
+ @site_name = ENV['SITE_NAME']
18
+ @api_key = ENV['API_KEY']
19
+ @api_secret = ENV['API_SECRET']
20
+ raise LoginRadius::Error.new, "'site_name' is a required option for Account class initialization." \
21
+ unless @site_name != '' && @site_name != nil
22
+ raise LoginRadius::Error.new, "'api_key' is a required option for Account class initialization." \
23
+ unless @api_key != '' && @api_key != nil
24
+ raise LoginRadius::Error.new, "'api_secret is a required option for Account class initialization." \
25
+ unless @api_secret != '' && @api_secret != nil
26
+ end
27
+
28
+ # This API is used to retrieve dropdown data.
29
+ #
30
+ # @param type - Type of the Datasource
31
+ # @param limit - Retrieve number of records at a time(max limit is 50)
32
+ # @param parent_id - Id of parent dropdown member(if any).
33
+ # @param skip - Skip number of records from start
34
+ #
35
+ # @return Complete user Registration data
36
+ # 7.1
37
+ def auth_get_registration_data(type, limit = '', parent_id = '', skip = '')
38
+ if isNullOrWhiteSpace(type)
39
+ raise LoginRadius::Error.new, getValidationMessage('type')
40
+ end
41
+
42
+ query_parameters = {}
43
+ query_parameters['apiKey'] = @api_key
44
+ unless limit == false
45
+ query_parameters['limit'] = limit
46
+ end
47
+ unless isNullOrWhiteSpace(parent_id)
48
+ query_parameters['parentId'] = parent_id
49
+ end
50
+ unless skip == false
51
+ query_parameters['skip'] = skip
52
+ end
53
+
54
+ resource_path = 'identity/v2/auth/registrationdata/' + type
55
+ get_request(resource_path, query_parameters, {})
56
+ end
57
+
58
+ # This API allows you to validate code for a particular dropdown member.
59
+ #
60
+ # @param code - Secret Code
61
+ # @param record_id - Selected dropdown item’s record id
62
+ #
63
+ # @return Response containing Definition of Complete Validation data
64
+ # 7.2
65
+ def validate_registration_data_code(code, record_id)
66
+ if isNullOrWhiteSpace(code)
67
+ raise LoginRadius::Error.new, getValidationMessage('code')
68
+ end
69
+ if isNullOrWhiteSpace(record_id)
70
+ raise LoginRadius::Error.new, getValidationMessage('record_id')
71
+ end
72
+
73
+ query_parameters = {}
74
+ query_parameters['apiKey'] = @api_key
75
+
76
+ body_parameters = {}
77
+ body_parameters['code'] = code
78
+ body_parameters['recordId'] = record_id
79
+
80
+ resource_path = 'identity/v2/auth/registrationdata/validatecode'
81
+ post_request(resource_path, query_parameters, body_parameters)
82
+ end
83
+
84
+ # This API is used to retrieve dropdown data.
85
+ #
86
+ # @param type - Type of the Datasource
87
+ # @param limit - Retrive number of records at a time(max limit is 50
88
+ # @param parent_id - Id of parent dropdown member(if any).
89
+ # @param skip - Skip number of records from start
90
+ #
91
+ # @return Complete user Registration data Fields
92
+ # 16.1
93
+ def get_registration_data(type, limit = '', parent_id = '', skip = '')
94
+ if isNullOrWhiteSpace(type)
95
+ raise LoginRadius::Error.new, getValidationMessage('type')
96
+ end
97
+
98
+ query_parameters = {}
99
+ query_parameters['apiKey'] = @api_key
100
+ query_parameters['apiSecret'] = @api_secret
101
+ unless limit == false
102
+ query_parameters['limit'] = limit
103
+ end
104
+ unless isNullOrWhiteSpace(parent_id)
105
+ query_parameters['parentId'] = parent_id
106
+ end
107
+ unless skip == false
108
+ query_parameters['skip'] = skip
109
+ end
110
+
111
+ resource_path = 'identity/v2/manage/registrationdata/' + type
112
+ get_request(resource_path, query_parameters, {})
113
+ end
114
+
115
+ # This API allows you to fill data into a dropdown list which you have created for user Registration. For more details on how to use this API please see our Custom Registration Data Overview
116
+ #
117
+ # @param registration_data_create_model_list - Model Class containing Definition of List of Registration Data
118
+ #
119
+ # @return Response containing Definition of Complete Validation data
120
+ # 16.2
121
+ def add_registration_data(registration_data_create_model_list)
122
+ if registration_data_create_model_list.blank?
123
+ raise LoginRadius::Error.new, getValidationMessage('registration_data_create_model_list')
124
+ end
125
+
126
+ query_parameters = {}
127
+ query_parameters['apiKey'] = @api_key
128
+ query_parameters['apiSecret'] = @api_secret
129
+
130
+ resource_path = 'identity/v2/manage/registrationdata'
131
+ post_request(resource_path, query_parameters, registration_data_create_model_list)
132
+ end
133
+
134
+ # This API allows you to update a dropdown item
135
+ #
136
+ # @param registration_data_update_model - Model Class containing Definition of payload for Registration Data update API
137
+ # @param record_id - Registration data RecordId
138
+ #
139
+ # @return Complete user Registration data Field
140
+ # 16.3
141
+ def update_registration_data(registration_data_update_model, record_id)
142
+ if registration_data_update_model.blank?
143
+ raise LoginRadius::Error.new, getValidationMessage('registration_data_update_model')
144
+ end
145
+ if isNullOrWhiteSpace(record_id)
146
+ raise LoginRadius::Error.new, getValidationMessage('record_id')
147
+ end
148
+
149
+ query_parameters = {}
150
+ query_parameters['apiKey'] = @api_key
151
+ query_parameters['apiSecret'] = @api_secret
152
+
153
+ resource_path = 'identity/v2/manage/registrationdata/' + record_id
154
+ put_request(resource_path, query_parameters, registration_data_update_model)
155
+ end
156
+
157
+ # This API allows you to delete an item from a dropdown list.
158
+ #
159
+ # @param record_id - Registration data RecordId
160
+ #
161
+ # @return Response containing Definition of Delete Request
162
+ # 16.4
163
+ def delete_registration_data(record_id)
164
+ if isNullOrWhiteSpace(record_id)
165
+ raise LoginRadius::Error.new, getValidationMessage('record_id')
166
+ end
167
+
168
+ query_parameters = {}
169
+ query_parameters['apiKey'] = @api_key
170
+ query_parameters['apiSecret'] = @api_secret
171
+
172
+ resource_path = 'identity/v2/manage/registrationdata/' + record_id
173
+ delete_request(resource_path, query_parameters, {})
174
+ end
175
+
176
+ # This API allows you to delete all records contained in a datasource.
177
+ #
178
+ # @param type - Type of the Datasource
179
+ #
180
+ # @return Response containing Definition of Delete Request
181
+ # 16.5
182
+ def delete_all_records_by_data_source(type)
183
+ if isNullOrWhiteSpace(type)
184
+ raise LoginRadius::Error.new, getValidationMessage('type')
185
+ end
186
+
187
+ query_parameters = {}
188
+ query_parameters['apiKey'] = @api_key
189
+ query_parameters['apiSecret'] = @api_secret
190
+
191
+ resource_path = 'identity/v2/manage/registrationdata/type/' + type
192
+ delete_request(resource_path, query_parameters, {})
193
+ end
194
+ end
195
+ end