login_radius 3.0.0 → 10.0.0.pre.beta
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/LICENSE.txt +21 -0
- data/README.md +58 -52
- data/lib/login_radius.rb +30 -15
- data/lib/login_radius/api/account/account_api.rb +581 -0
- data/lib/login_radius/api/account/role_api.rb +330 -0
- data/lib/login_radius/api/account/sott_api.rb +47 -0
- data/lib/login_radius/api/advanced/configuration_api.rb +57 -0
- data/lib/login_radius/api/advanced/consent_management_api.rb +161 -0
- data/lib/login_radius/api/advanced/custom_object_api.rb +316 -0
- data/lib/login_radius/api/advanced/custom_registration_data_api.rb +195 -0
- data/lib/login_radius/api/advanced/multi_factor_authentication_api.rb +606 -0
- data/lib/login_radius/api/advanced/re_authentication_api.rb +243 -0
- data/lib/login_radius/api/advanced/web_hook_api.rb +101 -0
- data/lib/login_radius/api/authentication/authentication_api.rb +986 -0
- data/lib/login_radius/api/authentication/one_touch_login_api.rb +160 -0
- data/lib/login_radius/api/authentication/password_less_login_api.rb +158 -0
- data/lib/login_radius/api/authentication/phone_authentication_api.rb +329 -0
- data/lib/login_radius/api/authentication/pin_authentication_api.rb +316 -0
- data/lib/login_radius/api/authentication/risk_based_authentication_api.rb +286 -0
- data/lib/login_radius/api/authentication/smart_login_api.rb +146 -0
- data/lib/login_radius/api/social/native_social_api.rb +193 -0
- data/lib/login_radius/api/social/social_api.rb +802 -0
- data/lib/login_radius/error.rb +7 -0
- data/lib/login_radius/request_client.rb +295 -0
- data/lib/login_radius/response.rb +12 -0
- data/lib/login_radius/version.rb +3 -3
- data/login_radius.gemspec +36 -0
- metadata +61 -20
- data/LICENSE +0 -22
- data/lib/hash.rb +0 -12
- data/lib/login_radius/advanced_api.rb +0 -133
- data/lib/login_radius/authentication_api.rb +0 -597
- data/lib/login_radius/exception.rb +0 -4
- data/lib/login_radius/management_api.rb +0 -327
- data/lib/login_radius/rest_request.rb +0 -142
- data/lib/login_radius/social_api.rb +0 -402
- data/lib/login_radius/two_fa_api.rb +0 -191
- data/lib/string.rb +0 -8
data/LICENSE
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
Copyright (c) 2013 Jordan Prince
|
2
|
-
|
3
|
-
MIT License
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
-
a copy of this software and associated documentation files (the
|
7
|
-
"Software"), to deal in the Software without restriction, including
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
11
|
-
the following conditions:
|
12
|
-
|
13
|
-
The above copyright notice and this permission notice shall be
|
14
|
-
included in all copies or substantial portions of the Software.
|
15
|
-
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/lib/hash.rb
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
class Hash
|
2
|
-
def self.lr_convert_hash_keys(value) #lr_ appended so no method naming conflicts with other gems
|
3
|
-
case value
|
4
|
-
when Array
|
5
|
-
value.map { |v| lr_convert_hash_keys(v) }
|
6
|
-
when Hash
|
7
|
-
Hash[value.map { |k, v| [k.to_s.lr_underscore, lr_convert_hash_keys(v)] }]
|
8
|
-
else
|
9
|
-
value
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
@@ -1,133 +0,0 @@
|
|
1
|
-
module LoginRadius
|
2
|
-
module AdvancedApi
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
# ------------------------------------------------------------- Get API --------------------------------------------------------------------#
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
def accesstokenViaFacebookToken(fb_access_token)
|
12
|
-
return getRequest("api/v2/access_token/facebook", {:key=> appkey,:fb_access_token=>fb_access_token},"api");
|
13
|
-
rescue LoginRadiusRaas::Exception => e
|
14
|
-
false
|
15
|
-
end
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
def accesstokenViaTwitterToken(tw_access_token,tw_token_secret)
|
20
|
-
return getRequest("api/v2/access_token/twitter", {:key=> appkey,:tw_access_token=>tw_access_token,:tw_token_secret=>tw_token_secret},"api");
|
21
|
-
rescue LoginRadiusRaas::Exception => e
|
22
|
-
false
|
23
|
-
end
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
def accesstokenViaVkontakteToken(vk_access_token)
|
28
|
-
return getRequest("api/v2/access_token/vkontakte", {:key=> appkey,:vk_access_token=>vk_access_token},"api");
|
29
|
-
rescue LoginRadiusRaas::Exception => e
|
30
|
-
false
|
31
|
-
end
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
def getTrackableStatusStats(access_token,status,title,url,imageurl,caption,description)
|
36
|
-
param = {
|
37
|
-
:access_token => access_token,
|
38
|
-
:status=> status,
|
39
|
-
:title => title,
|
40
|
-
:url=> url,
|
41
|
-
:imageurl => imageurl,
|
42
|
-
:caption=> caption,
|
43
|
-
:description => description
|
44
|
-
}
|
45
|
-
return getRequest("api/v2/status/trackable/js", param,"api");
|
46
|
-
rescue LoginRadiusRaas::Exception => e
|
47
|
-
false
|
48
|
-
end
|
49
|
-
|
50
|
-
|
51
|
-
def refreshUserProfile(access_token)
|
52
|
-
return getRequest("api/v2/userprofile/refresh", {:access_token=> access_token},"api");
|
53
|
-
rescue LoginRadiusRaas::Exception => e
|
54
|
-
false
|
55
|
-
end
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
def refreshToken(access_token)
|
60
|
-
return getRequest("api/v2/userprofile/refresh", {:access_token=> access_token,:secret=> appsecret},"api");
|
61
|
-
rescue LoginRadiusRaas::Exception => e
|
62
|
-
false
|
63
|
-
end
|
64
|
-
|
65
|
-
|
66
|
-
def shortenUrl(key,url)
|
67
|
-
return getRequest("sharing/v1/shorturl", {:key=> appkey,:url=> url},"api");
|
68
|
-
rescue LoginRadiusRaas::Exception => e
|
69
|
-
false
|
70
|
-
end
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
def trackableStatusFetching(postid)
|
75
|
-
return getRequest("api/v2/status/trackable", {:secret=> appsecret,:postid=> postid},"api");
|
76
|
-
rescue LoginRadiusRaas::Exception => e
|
77
|
-
false
|
78
|
-
end
|
79
|
-
|
80
|
-
|
81
|
-
def getActiveSessionDetails(token)
|
82
|
-
return getRequest("api/v2/access_token/activesession", {:key=> appkey,:secret=> appsecret,:token=> token},"api");
|
83
|
-
rescue LoginRadiusRaas::Exception => e
|
84
|
-
false
|
85
|
-
end
|
86
|
-
|
87
|
-
|
88
|
-
def webhookTest()
|
89
|
-
return getRequest("api/v2/webhook/test", {:apikey=> appkey,:apisecret=>appsecret},"api");
|
90
|
-
rescue LoginRadiusRaas::Exception => e
|
91
|
-
false
|
92
|
-
end
|
93
|
-
|
94
|
-
|
95
|
-
def webhookSubscribedUrls(event)
|
96
|
-
return getRequest("api/v2/webhook", {:apikey=> appkey,:apisecret=>appsecret,:event=>event},"api");
|
97
|
-
rescue LoginRadiusRaas::Exception => e
|
98
|
-
false
|
99
|
-
end
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
# ------------------------------------------------------------- Post API --------------------------------------------------------------------#
|
104
|
-
|
105
|
-
|
106
|
-
def trackableStatusPosting(access_token,payload)
|
107
|
-
return postRequest("api/v2/status/trackable",{:access_token=> access_token},payload,nil,"api");
|
108
|
-
rescue LoginRadiusRaas::Exception => e
|
109
|
-
false
|
110
|
-
end
|
111
|
-
|
112
|
-
|
113
|
-
def webhookSubscribe(payload)
|
114
|
-
return postRequest("api/v2/webhook",{:apikey=> appkey,:apisecret=>appsecret},payload,nil,"api");
|
115
|
-
rescue LoginRadiusRaas::Exception => e
|
116
|
-
false
|
117
|
-
end
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
# ---------------------------------------------------------- Delete API --------------------------------------------------------------------#
|
124
|
-
|
125
|
-
|
126
|
-
def webhookUnsubscribe(payload)
|
127
|
-
return deleteRequest("api/v2/webhook",{:apikey=> appkey,:apisecret=>appsecret},payload);
|
128
|
-
rescue LoginRadiusRaas::Exception => e
|
129
|
-
false
|
130
|
-
end
|
131
|
-
|
132
|
-
end
|
133
|
-
end
|
@@ -1,597 +0,0 @@
|
|
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
|