login_radius 2.0.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/login_radius/advanced_api.rb +133 -0
- data/lib/login_radius/authentication_api.rb +597 -0
- data/lib/login_radius/exception.rb +1 -1
- data/lib/login_radius/management_api.rb +327 -0
- data/lib/login_radius/rest_request.rb +142 -0
- data/lib/login_radius/{basic_api.rb → social_api.rb} +210 -197
- data/lib/login_radius/two_fa_api.rb +191 -0
- data/lib/login_radius/version.rb +2 -2
- data/lib/login_radius.rb +8 -6
- metadata +12 -12
- data/lib/login_radius/account_api.rb +0 -130
- data/lib/login_radius/custom_object_api.rb +0 -347
- data/lib/login_radius/raas_api.rb +0 -102
- data/lib/login_radius/user_api.rb +0 -283
@@ -0,0 +1,597 @@
|
|
1
|
+
module LoginRadius
|
2
|
+
module AuthenticationApi
|
3
|
+
|
4
|
+
|
5
|
+
|
6
|
+
# ------------------------------------------------------------- Get API --------------------------------------------------------------------#
|
7
|
+
|
8
|
+
|
9
|
+
|
10
|
+
def authCheckEmailAvailability(email)
|
11
|
+
return getRequest("identity/v2/auth/email", {:email=>email,:apikey=>appkey},"api");
|
12
|
+
rescue LoginRadiusRaas::Exception => e
|
13
|
+
false
|
14
|
+
end
|
15
|
+
|
16
|
+
|
17
|
+
|
18
|
+
def authCheckUserNameAvailability(username)
|
19
|
+
return getRequest("identity/v2/auth/username", {:username=>username,:apikey=>appkey},"api");
|
20
|
+
rescue LoginRadiusRaas::Exception => e
|
21
|
+
false
|
22
|
+
end
|
23
|
+
|
24
|
+
|
25
|
+
def authReadAllProfiles(access_token)
|
26
|
+
return getRequest("identity/v2/auth/account", {:apikey=> appkey,:access_token=> access_token},"api");
|
27
|
+
rescue LoginRadiusRaas::Exception => e
|
28
|
+
false
|
29
|
+
end
|
30
|
+
|
31
|
+
def authSocialIdentity(access_token)
|
32
|
+
return getRequest("identity/v2/auth/socialidentity", {:apikey=> appkey,:access_token=> access_token},"api");
|
33
|
+
rescue LoginRadiusRaas::Exception => e
|
34
|
+
false
|
35
|
+
end
|
36
|
+
|
37
|
+
|
38
|
+
def authValidateAccessToken(access_token)
|
39
|
+
return getRequest("identity/v2/auth/access_token/validate", {:apikey=> appkey,:access_token=> access_token},"api");
|
40
|
+
rescue LoginRadiusRaas::Exception => e
|
41
|
+
false
|
42
|
+
end
|
43
|
+
|
44
|
+
|
45
|
+
def authVerifyEmail(verificationtoken,url,welcomeemailtemplate)
|
46
|
+
param = {
|
47
|
+
:apikey=> appkey,
|
48
|
+
:verificationtoken => verificationtoken,
|
49
|
+
:url => url,
|
50
|
+
:welcomeemailtemplate => welcomeemailtemplate
|
51
|
+
}
|
52
|
+
return getRequest("identity/v2/auth/email",param,"api");
|
53
|
+
rescue LoginRadiusRaas::Exception => e
|
54
|
+
false
|
55
|
+
end
|
56
|
+
|
57
|
+
|
58
|
+
def auth_delete_account(deletetoken)
|
59
|
+
return getRequest("identity/v2/auth/account/delete",{:apikey=> appkey,:deletetoken=> deletetoken},"api");
|
60
|
+
rescue LoginRadiusRaas::Exception => e
|
61
|
+
false
|
62
|
+
end
|
63
|
+
|
64
|
+
|
65
|
+
def authAccessTokenInvalidate(access_token)
|
66
|
+
return getRequest("identity/v2/auth/access_token/invalidate",{:apikey=> appkey,:access_token=> access_token},"api");
|
67
|
+
rescue LoginRadiusRaas::Exception => e
|
68
|
+
false
|
69
|
+
end
|
70
|
+
|
71
|
+
|
72
|
+
def authSecurityQuestionsByAccessToken(access_token)
|
73
|
+
return getRequest("identity/v2/auth/securityquestion/accesstoken",{:apikey=> appkey,:access_token=> access_token},"api");
|
74
|
+
rescue LoginRadiusRaas::Exception => e
|
75
|
+
false
|
76
|
+
end
|
77
|
+
|
78
|
+
def authSecurityQuestionsByEmail(email)
|
79
|
+
return getRequest("identity/v2/auth/securityquestion/email",{:apikey=> appkey,:email=> email},"api");
|
80
|
+
rescue LoginRadiusRaas::Exception => e
|
81
|
+
false
|
82
|
+
end
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
def authSecurityQuestionsByUserName(username)
|
87
|
+
return getRequest("identity/v2/auth/securityquestion/username",{:apikey=> appkey,:username=> username},"api");
|
88
|
+
rescue LoginRadiusRaas::Exception => e
|
89
|
+
false
|
90
|
+
end
|
91
|
+
|
92
|
+
|
93
|
+
def authSecurityQuestionsByPhone(phone)
|
94
|
+
return getRequest("identity/v2/auth/securityquestion/phone",{:apikey=> appkey,:phone=> phone},"api");
|
95
|
+
rescue LoginRadiusRaas::Exception => e
|
96
|
+
false
|
97
|
+
end
|
98
|
+
|
99
|
+
|
100
|
+
def auth_phone_login_using_otp(phone,otp,smstemplate)
|
101
|
+
param = {
|
102
|
+
:phone => phone,
|
103
|
+
:apikey=> appkey,
|
104
|
+
:otp => otp,
|
105
|
+
:smstemplate => smstemplate
|
106
|
+
}
|
107
|
+
return getRequest("identity/v2/auth/login",param,"api");
|
108
|
+
rescue LoginRadiusRaas::Exception => e
|
109
|
+
false
|
110
|
+
end
|
111
|
+
|
112
|
+
|
113
|
+
def authPhoneNumberAvailability(phone)
|
114
|
+
return getRequest("identity/v2/auth/phone",{:apikey=> appkey,:phone=> phone},"api");
|
115
|
+
rescue LoginRadiusRaas::Exception => e
|
116
|
+
false
|
117
|
+
end
|
118
|
+
|
119
|
+
|
120
|
+
def auth_phone_send_otp(phone,smstemplate)
|
121
|
+
return getRequest("identity/v2/auth/login/otp",{:apikey=> appkey,:phone=> phone,:smstemplate=> smstemplate},"api");
|
122
|
+
rescue LoginRadiusRaas::Exception => e
|
123
|
+
false
|
124
|
+
end
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
def auth_instant_link_login_by_email(email,oneclicksignintemplate,verificationurl)
|
130
|
+
return getRequest("identity/v2/auth/login/oneclicksignin",{:apikey=> appkey,:email=> email,:oneclicksignintemplate=> oneclicksignintemplate,:verificationurl=> verificationurl},"api");
|
131
|
+
rescue LoginRadiusRaas::Exception => e
|
132
|
+
false
|
133
|
+
end
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
def auth_instant_link_login_by_username(username,oneclicksignintemplate,verificationurl)
|
138
|
+
return getRequest("identity/v2/auth/login/oneclicksignin",{:apikey=> appkey,:username=> username,:oneclicksignintemplate=> oneclicksignintemplate,:verificationurl=> verificationurl},"api");
|
139
|
+
rescue LoginRadiusRaas::Exception => e
|
140
|
+
false
|
141
|
+
end
|
142
|
+
|
143
|
+
|
144
|
+
def auth_instant_login_verification(verificationtoken,welcomeemailtemplate)
|
145
|
+
return getRequest("identity/v2/auth/login/oneclickverify",{:apikey=> appkey,:verificationtoken=> verificationtoken,:welcomeemailtemplate=> welcomeemailtemplate},"api");
|
146
|
+
rescue LoginRadiusRaas::Exception => e
|
147
|
+
false
|
148
|
+
end
|
149
|
+
|
150
|
+
|
151
|
+
def authEmailPromptAutoLoginByEmail(email,clientguid,autologinemailtemplate,welcomeemailtemplate,redirecturl)
|
152
|
+
param = {
|
153
|
+
:email => email,
|
154
|
+
:apikey=> appkey,
|
155
|
+
:clientguid => clientguid,
|
156
|
+
:autologinemailtemplate => autologinemailtemplate,
|
157
|
+
:welcomeemailtemplate => welcomeemailtemplate,
|
158
|
+
:redirecturl => redirecturl
|
159
|
+
}
|
160
|
+
return getRequest("identity/v2/auth/login/autologin",param,"api");
|
161
|
+
rescue LoginRadiusRaas::Exception => e
|
162
|
+
false
|
163
|
+
end
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
def authEmailPromptAutoLoginByUserName(username,clientguid,autologinemailtemplate,welcomeemailtemplate,redirecturl)
|
168
|
+
param = {
|
169
|
+
:username => username,
|
170
|
+
:apikey=> appkey,
|
171
|
+
:clientguid => clientguid,
|
172
|
+
:autologinemailtemplate => autologinemailtemplate,
|
173
|
+
:welcomeemailtemplate => welcomeemailtemplate,
|
174
|
+
:redirecturl => redirecturl
|
175
|
+
}
|
176
|
+
return getRequest("identity/v2/auth/login/autologin",param,"api");
|
177
|
+
rescue LoginRadiusRaas::Exception => e
|
178
|
+
false
|
179
|
+
end
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
def authEmailPromptAutoLoginPing(clientguid)
|
185
|
+
return getRequest("identity/v2/auth/login/autologin/ping",{:apikey=> appkey,:clientguid=> clientguid},"api");
|
186
|
+
rescue LoginRadiusRaas::Exception => e
|
187
|
+
false
|
188
|
+
end
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
def authVerifyAutoLoginEmailForLogin(verificationtoken,welcomeEmailTemplate)
|
193
|
+
return getRequest("identity/v2/auth/email/autologin",{:apikey=> appkey,:verificationtoken=> verificationtoken,:welcomeEmailTemplate=> welcomeEmailTemplate},"api");
|
194
|
+
rescue LoginRadiusRaas::Exception => e
|
195
|
+
false
|
196
|
+
end
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
def authSimplifiedInstantRegistrationByEmail(email,name,clientguid,redirecturl,noregistrationemailtemplate,welcomeemailtemplate)
|
201
|
+
param = {
|
202
|
+
:email => email ,
|
203
|
+
:apikey=> appkey,
|
204
|
+
:name => name,
|
205
|
+
:clientguid => clientguid,
|
206
|
+
:redirecturl => redirecturl,
|
207
|
+
:noregistrationemailtemplate => noregistrationemailtemplate,
|
208
|
+
:welcomeemailtemplate => welcomeemailtemplate
|
209
|
+
}
|
210
|
+
return getRequest("identity/v2/auth/noregistration/email",param,"api");
|
211
|
+
rescue LoginRadiusRaas::Exception => e
|
212
|
+
false
|
213
|
+
end
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
def authSimplifiedInstantRegistrationByPhone(phone,name,smstemplate)
|
218
|
+
param = {
|
219
|
+
:phone => phone ,
|
220
|
+
:apikey=> appkey,
|
221
|
+
:name => name,
|
222
|
+
:smstemplate => smstemplate
|
223
|
+
}
|
224
|
+
return getRequest("identity/v2/auth/noregistration/phone",param,"api");
|
225
|
+
rescue LoginRadiusRaas::Exception => e
|
226
|
+
false
|
227
|
+
end
|
228
|
+
|
229
|
+
|
230
|
+
def authCustomObjectByObjectrecordId(access_token,objectname,objectrecordid)
|
231
|
+
param = {
|
232
|
+
:apikey=> appkey,
|
233
|
+
:access_token => access_token,
|
234
|
+
:objectname => objectname
|
235
|
+
}
|
236
|
+
return getRequest("identity/v2/auth/customobject/"+objectrecordid,param,"api");
|
237
|
+
rescue LoginRadiusRaas::Exception => e
|
238
|
+
false
|
239
|
+
end
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
def authCustomObjectByToken(access_token,objectname)
|
244
|
+
param = {
|
245
|
+
:apikey=> appkey,
|
246
|
+
:access_token => access_token,
|
247
|
+
:objectname => objectname
|
248
|
+
}
|
249
|
+
return getRequest("identity/v2/auth/customobject",param,"api");
|
250
|
+
rescue LoginRadiusRaas::Exception => e
|
251
|
+
false
|
252
|
+
end
|
253
|
+
|
254
|
+
|
255
|
+
def getConfigurations()
|
256
|
+
return getRequest("ciam/appinfo",{:apikey=> appkey},"config");
|
257
|
+
rescue LoginRadiusRaas::Exception => e
|
258
|
+
false
|
259
|
+
end
|
260
|
+
|
261
|
+
|
262
|
+
# ------------------------------------------------------------- Post API --------------------------------------------------------------------#
|
263
|
+
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
def authAddEmail(access_token,verificationurl,emailtemplate,payload)
|
268
|
+
param = {
|
269
|
+
:access_token => access_token,
|
270
|
+
:apikey=> appkey,
|
271
|
+
:verificationurl => verificationurl,
|
272
|
+
:emailtemplate => emailtemplate
|
273
|
+
}
|
274
|
+
return postRequest("identity/v2/auth/email",param,payload,nil,"api");
|
275
|
+
rescue LoginRadiusRaas::Exception => e
|
276
|
+
false
|
277
|
+
end
|
278
|
+
|
279
|
+
|
280
|
+
def authForgotPassword(resetpasswordurl,emailtemplate,payload)
|
281
|
+
param = {
|
282
|
+
:resetpasswordurl => resetpasswordurl,
|
283
|
+
:apikey=> appkey,
|
284
|
+
:emailtemplate => emailtemplate
|
285
|
+
}
|
286
|
+
return postRequest("identity/v2/auth/password",param,payload,nil,"api");
|
287
|
+
rescue LoginRadiusRaas::Exception => e
|
288
|
+
false
|
289
|
+
end
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
def authUserRegistrationByEmail(verificationurl,emailtemplate,sott,payload)
|
294
|
+
param = {
|
295
|
+
:verificationurl => verificationurl,
|
296
|
+
:apikey=> appkey,
|
297
|
+
:emailtemplate => emailtemplate
|
298
|
+
}
|
299
|
+
return postRequest("identity/v2/auth/register",param,payload,sott,"api");
|
300
|
+
rescue LoginRadiusRaas::Exception => e
|
301
|
+
false
|
302
|
+
end
|
303
|
+
|
304
|
+
|
305
|
+
def authUserRegistrationByPhone(smstemplate,verificationurl,sott,payload)
|
306
|
+
param = {
|
307
|
+
:apikey=> appkey,
|
308
|
+
:verificationurl => verificationurl,
|
309
|
+
:smstemplate => smstemplate
|
310
|
+
}
|
311
|
+
return postRequest("identity/v2/auth/register",param,payload,sott,"api");
|
312
|
+
rescue LoginRadiusRaas::Exception => e
|
313
|
+
false
|
314
|
+
end
|
315
|
+
|
316
|
+
|
317
|
+
def authLoginByEmail(verificationurl,loginurl,emailtemplate,recaptcha,payload)
|
318
|
+
param = {
|
319
|
+
:verificationurl => verificationurl,
|
320
|
+
:apikey=> appkey,
|
321
|
+
:loginurl => loginurl,
|
322
|
+
:emailtemplate => emailtemplate,
|
323
|
+
:"g-recaptcha-response" => recaptcha
|
324
|
+
}
|
325
|
+
return postRequest("identity/v2/auth/login",param,payload,nil,"api");
|
326
|
+
rescue LoginRadiusRaas::Exception => e
|
327
|
+
false
|
328
|
+
end
|
329
|
+
|
330
|
+
|
331
|
+
|
332
|
+
def authLoginByUserName(verificationurl,loginurl,emailtemplate,recaptcha,payload)
|
333
|
+
param = {
|
334
|
+
:verificationurl => verificationurl,
|
335
|
+
:apikey=> appkey,
|
336
|
+
:loginurl => loginurl,
|
337
|
+
:emailtemplate => emailtemplate,
|
338
|
+
:"g-recaptcha-response" => recaptcha
|
339
|
+
}
|
340
|
+
return postRequest("identity/v2/auth/login",param,payload,nil,"api");
|
341
|
+
rescue LoginRadiusRaas::Exception => e
|
342
|
+
false
|
343
|
+
end
|
344
|
+
|
345
|
+
|
346
|
+
def authLoginByPhone(verificationurl,loginurl,smstemplate,recaptcha,payload)
|
347
|
+
param = {
|
348
|
+
:verificationurl => verificationurl,
|
349
|
+
:apikey=> appkey,
|
350
|
+
:loginurl => loginurl,
|
351
|
+
:smstemplate => smstemplate,
|
352
|
+
:"g-recaptcha-response" => recaptcha
|
353
|
+
}
|
354
|
+
return postRequest("identity/v2/auth/login",param,payload,nil,"api");
|
355
|
+
rescue LoginRadiusRaas::Exception => e
|
356
|
+
false
|
357
|
+
end
|
358
|
+
|
359
|
+
|
360
|
+
def authForgotPasswordByOtp(smstemplate,payload)
|
361
|
+
param = {
|
362
|
+
:apikey=> appkey,
|
363
|
+
:smstemplate => smstemplate
|
364
|
+
}
|
365
|
+
return postRequest("identity/v2/auth/password/otp",param,payload,nil,"api");
|
366
|
+
rescue LoginRadiusRaas::Exception => e
|
367
|
+
false
|
368
|
+
end
|
369
|
+
|
370
|
+
def authPhoneResendOtp(smstemplate,payload)
|
371
|
+
param = {
|
372
|
+
:apikey=> appkey,
|
373
|
+
:smstemplate => smstemplate
|
374
|
+
}
|
375
|
+
return postRequest("identity/v2/auth/phone/otp",param,payload,nil,"api");
|
376
|
+
rescue LoginRadiusRaas::Exception => e
|
377
|
+
false
|
378
|
+
end
|
379
|
+
|
380
|
+
|
381
|
+
|
382
|
+
def authPhoneResendOtpByToken(access_token,smstemplate)
|
383
|
+
param = {
|
384
|
+
:apikey=> appkey,
|
385
|
+
:access_token => access_token,
|
386
|
+
:smstemplate => smstemplate
|
387
|
+
}
|
388
|
+
return postRequest("identity/v2/auth/phone/otp",param,{},nil,"api");
|
389
|
+
rescue LoginRadiusRaas::Exception => e
|
390
|
+
false
|
391
|
+
end
|
392
|
+
|
393
|
+
|
394
|
+
def authCreateCustomObjectByToken(access_token,objectname,payload)
|
395
|
+
param = {
|
396
|
+
:apikey=> appkey,
|
397
|
+
:access_token => access_token,
|
398
|
+
:objectname => objectname
|
399
|
+
}
|
400
|
+
return postRequest("identity/v2/auth/customobject",param,payload,nil,"api");
|
401
|
+
rescue LoginRadiusRaas::Exception => e
|
402
|
+
false
|
403
|
+
end
|
404
|
+
|
405
|
+
|
406
|
+
|
407
|
+
# ------------------------------------------------------------- Put API --------------------------------------------------------------------#
|
408
|
+
|
409
|
+
|
410
|
+
|
411
|
+
def authPhoneNumberUpdate(access_token,phone,smstemplate)
|
412
|
+
payload = {
|
413
|
+
:phone=> phone
|
414
|
+
}
|
415
|
+
return putRequest("identity/v2/auth/phone",{:apikey=> appkey,:access_token=> access_token,:smstemplate=> smstemplate},payload,"api");
|
416
|
+
rescue LoginRadiusRaas::Exception => e
|
417
|
+
false
|
418
|
+
end
|
419
|
+
|
420
|
+
|
421
|
+
|
422
|
+
def authPhoneResetPasswordByOtp(payload)
|
423
|
+
return putRequest("identity/v2/auth/password/otp",{:apikey=> appkey},payload,"api");
|
424
|
+
rescue LoginRadiusRaas::Exception => e
|
425
|
+
false
|
426
|
+
end
|
427
|
+
|
428
|
+
|
429
|
+
def authPhoneVerificationByOtp(otp,phone,smstemplate)
|
430
|
+
payload = {
|
431
|
+
:phone=> phone
|
432
|
+
}
|
433
|
+
return putRequest("identity/v2/auth/phone/otp",{:apikey=> appkey,:otp=> otp,:smstemplate=> smstemplate},payload,"api");
|
434
|
+
rescue LoginRadiusRaas::Exception => e
|
435
|
+
false
|
436
|
+
end
|
437
|
+
|
438
|
+
|
439
|
+
def authPhoneVerificationOtpByToken(access_token,otp,smstemplate)
|
440
|
+
return putRequest("identity/v2/auth/phone/otp",{:apikey=> appkey,:access_token=> access_token,:otp=> otp,:smstemplate=> smstemplate},{},"api");
|
441
|
+
rescue LoginRadiusRaas::Exception => e
|
442
|
+
false
|
443
|
+
end
|
444
|
+
|
445
|
+
|
446
|
+
def auth_reset_phone_id_verification(uid)
|
447
|
+
return putRequest("identity/v2/manage/account/"+uid+"/invalidatephone",{:apikey=> appkey,:apisecret=>appsecret},{},"api");
|
448
|
+
rescue LoginRadiusRaas::Exception => e
|
449
|
+
false
|
450
|
+
end
|
451
|
+
|
452
|
+
|
453
|
+
def authChangePassword(access_token,oldpassword,newpassword)
|
454
|
+
payload = {
|
455
|
+
:oldpassword=> oldpassword,
|
456
|
+
:newpassword=>newpassword
|
457
|
+
}
|
458
|
+
return putRequest("identity/v2/auth/password",{:apikey=> appkey,:access_token=>access_token},payload,"api");
|
459
|
+
rescue LoginRadiusRaas::Exception => e
|
460
|
+
false
|
461
|
+
end
|
462
|
+
|
463
|
+
|
464
|
+
def authLinkSocialIdentities(access_token,candidatetoken)
|
465
|
+
payload = {
|
466
|
+
:candidatetoken=> candidatetoken
|
467
|
+
}
|
468
|
+
return putRequest("identity/v2/auth/socialidentity",{:apikey=> appkey,:access_token=>access_token},payload,"api");
|
469
|
+
rescue LoginRadiusRaas::Exception => e
|
470
|
+
false
|
471
|
+
end
|
472
|
+
|
473
|
+
|
474
|
+
def authResendEmailVerification(verificationurl,emailtemplate,payload)
|
475
|
+
return putRequest("identity/v2/auth/register",{:apikey=> appkey,:verificationurl=>verificationurl,:emailtemplate=>emailtemplate},payload,"api");
|
476
|
+
rescue LoginRadiusRaas::Exception => e
|
477
|
+
false
|
478
|
+
end
|
479
|
+
|
480
|
+
|
481
|
+
|
482
|
+
def authResetPasswordByResetToken(payload)
|
483
|
+
return putRequest("identity/v2/auth/password",{:apikey=> appkey},payload,"api");
|
484
|
+
rescue LoginRadiusRaas::Exception => e
|
485
|
+
false
|
486
|
+
end
|
487
|
+
|
488
|
+
|
489
|
+
def authResetPasswordBySecurityAnswerAndEmail(payload)
|
490
|
+
return putRequest("identity/v2/auth/password/securityanswer",{:apikey=> appkey},payload,"api");
|
491
|
+
rescue LoginRadiusRaas::Exception => e
|
492
|
+
false
|
493
|
+
end
|
494
|
+
|
495
|
+
|
496
|
+
def authResetPasswordBySecurityAnswerAndUserName(payload)
|
497
|
+
return putRequest("identity/v2/auth/password/securityanswer",{:apikey=> appkey},payload,"api");
|
498
|
+
rescue LoginRadiusRaas::Exception => e
|
499
|
+
false
|
500
|
+
end
|
501
|
+
|
502
|
+
|
503
|
+
def authResetPasswordBySecurityAnswerAndPhone(payload)
|
504
|
+
return putRequest("identity/v2/auth/password/securityanswer",{:apikey=> appkey},payload,"api");
|
505
|
+
rescue LoginRadiusRaas::Exception => e
|
506
|
+
false
|
507
|
+
end
|
508
|
+
|
509
|
+
|
510
|
+
def authChangeUserName(access_token,username)
|
511
|
+
payload = {
|
512
|
+
:username=> username
|
513
|
+
}
|
514
|
+
return putRequest("identity/v2/auth/username",{:apikey=> appkey,:access_token=> access_token},payload,"api");
|
515
|
+
rescue LoginRadiusRaas::Exception => e
|
516
|
+
false
|
517
|
+
end
|
518
|
+
|
519
|
+
|
520
|
+
def authUpdateProfileByToken(access_token,verificationurl,emailtemplate,smstemplate,payload)
|
521
|
+
return putRequest("identity/v2/auth/account",{:apikey=> appkey,:access_token=> access_token,:verificationurl=> verificationurl,:emailtemplate=> emailtemplate,:smstemplate=> smstemplate},payload,"api");
|
522
|
+
rescue LoginRadiusRaas::Exception => e
|
523
|
+
false
|
524
|
+
end
|
525
|
+
|
526
|
+
|
527
|
+
def authUpdateSecurityQuestionByAccessToken(access_token,payload)
|
528
|
+
return putRequest("identity/v2/auth/account",{:apikey=> appkey,:access_token=> access_token},payload,"api");
|
529
|
+
rescue LoginRadiusRaas::Exception => e
|
530
|
+
false
|
531
|
+
end
|
532
|
+
|
533
|
+
|
534
|
+
|
535
|
+
def authCustomObjectUpdateByToken(access_token,objectname,updatetype,objectrecordid,payload)
|
536
|
+
return putRequest("identity/v2/auth/customobject/"+objectrecordid,{:apikey=> appkey,:access_token=> access_token,:objectname=> objectname,:updatetype=> updatetype},payload,"api");
|
537
|
+
rescue LoginRadiusRaas::Exception => e
|
538
|
+
false
|
539
|
+
end
|
540
|
+
|
541
|
+
|
542
|
+
def authSimplifiedInstantRegistrationOtpVerification(otp,smstemplate,phone)
|
543
|
+
param = {
|
544
|
+
:apikey=> appkey,
|
545
|
+
:otp => otp,
|
546
|
+
:smstemplate => smstemplate
|
547
|
+
}
|
548
|
+
payload = {
|
549
|
+
:phone=> phone
|
550
|
+
}
|
551
|
+
return putRequest("identity/v2/auth/noregistration/phone/verify",param,payload,"api");
|
552
|
+
rescue LoginRadiusRaas::Exception => e
|
553
|
+
false
|
554
|
+
end
|
555
|
+
|
556
|
+
# ------------------------------------------------------------- Delete API --------------------------------------------------------------------#
|
557
|
+
|
558
|
+
|
559
|
+
|
560
|
+
def authDeleteAccountWithEmailConfirmation(access_token,deleteurl,emailtemplate)
|
561
|
+
return deleteRequest("identity/v2/auth/account",{:apikey=> appkey,:access_token=> access_token,:deleteurl=> deleteurl,:emailtemplate=> emailtemplate},{});
|
562
|
+
rescue LoginRadiusRaas::Exception => e
|
563
|
+
false
|
564
|
+
end
|
565
|
+
|
566
|
+
|
567
|
+
def authRemoveEmail(access_token,email)
|
568
|
+
payload = {
|
569
|
+
:email=> email
|
570
|
+
}
|
571
|
+
return deleteRequest("identity/v2/auth/email",{:apikey=> appkey,:access_token=> access_token},payload);
|
572
|
+
rescue LoginRadiusRaas::Exception => e
|
573
|
+
false
|
574
|
+
end
|
575
|
+
|
576
|
+
|
577
|
+
def authUnlinkSocialIdentities(access_token,payload)
|
578
|
+
return deleteRequest("identity/v2/auth/socialidentity",{:apikey=> appkey,:access_token=> access_token},payload);
|
579
|
+
rescue LoginRadiusRaas::Exception => e
|
580
|
+
false
|
581
|
+
end
|
582
|
+
|
583
|
+
|
584
|
+
|
585
|
+
def authCustomObjectDeleteByRecordId(access_token,objectname,objectrecordid)
|
586
|
+
return deleteRequest("identity/v2/auth/customobject/"+objectrecordid,{:apikey=> appkey,:access_token=> access_token,:objectname=> objectname},{});
|
587
|
+
rescue LoginRadiusRaas::Exception => e
|
588
|
+
false
|
589
|
+
end
|
590
|
+
|
591
|
+
|
592
|
+
|
593
|
+
|
594
|
+
|
595
|
+
|
596
|
+
end
|
597
|
+
end
|