login_radius 2.0.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51d34e0cc8878984ba63856bc11c98bf1c10dd52
|
4
|
+
data.tar.gz: c346f4b1b45319011cccc9ecf72b15b14fca0431
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98d28d1c1bf91b0558d5bf606c808272a03f2621707dcfde759c97fb2a050d8203d2b48fde50d80400c984615d473d04863a51248a50f998e12433b78b71521b
|
7
|
+
data.tar.gz: dfbe12ac630adff536aacdf364121167c9218738885bfce8daeadef1447b2467e446be285a0b5dd6c9f76538625bf441e0850a592fa518c1512c9628921bc9aa
|
data/README.md
CHANGED
@@ -29,7 +29,7 @@ Take a peek:
|
|
29
29
|
:appsecret => "<LOGINRADIUS_APPSECRET>",
|
30
30
|
:objectId => "<LOGINRADIUS_OBJECT_ID>"
|
31
31
|
}
|
32
|
-
@user_profile =
|
32
|
+
@user_profile = LoginRadius::RestRequest.new(@LoginRadius);
|
33
33
|
|
34
34
|
|
35
35
|
### How to get a token and actually make a client
|
@@ -0,0 +1,133 @@
|
|
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
|