canvas-embed 0.1.5 → 0.1.6
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/example/Gemfile.lock +1 -1
- data/example/app/controllers/application_controller.rb +3 -1
- data/example/log/development.log +280 -0
- data/example/storage/development.sqlite3-shm +0 -0
- data/example/storage/development.sqlite3-wal +0 -0
- data/example/tmp/cache/bootsnap/compile-cache-iseq/b2/d451a148d6d303 +0 -0
- data/example/tmp/cache/bootsnap/compile-cache-iseq/d8/fff5874ac0039e +0 -0
- data/example/tmp/cache/bootsnap/compile-cache-iseq/ee/02ad963145723a +0 -0
- data/example/tmp/cache/bootsnap/load-path-cache +0 -0
- data/example/tmp/pids/server.pid +1 -1
- data/lib/canvas/embed/version.rb +1 -1
- data/lib/canvas/embed.rb +1 -1
- data/pkg/canvas-embed-0.1.5.gem +0 -0
- data/spec/canvas/embed_spec.rb +3 -3
- metadata +6 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ed39f8027511445d28514cde191bade34d5b4101814dfb4bd7307d5b7eb51e4
|
4
|
+
data.tar.gz: 7528eaaf4db9c5c77d3be5a6a50ba40eb1321e9805b119b3144300ea020cd861
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a277e1fe0976095609dea6a27e35101028eeec6c8cb0129e05b91a61c8b40eab15c8a445189c9219915355d58722f6cdce6d4ae0998bfb80bf2158a1d1fd0580
|
7
|
+
data.tar.gz: edacd70f37ed8c97e9a4a045c795e5608ad967bf088cd5b9e6818a00be9889dbbb451eb5f422c0bd5fae1ab120331ea442b77533804867475109d06d8654c833
|
data/example/Gemfile.lock
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
include Canvas::Embed
|
4
|
+
|
3
5
|
class ApplicationController < ActionController::Base
|
4
6
|
def generate_token
|
5
7
|
# this is the secret signing key from Canvas
|
@@ -11,7 +13,7 @@ class ApplicationController < ActionController::Base
|
|
11
13
|
rescue StandardError
|
12
14
|
return render json: { 'message' => 'Scopes were not valid JSON' }, status: 500
|
13
15
|
end
|
14
|
-
token = Canvas::Embed.generate_token(key_hex, scopes)
|
16
|
+
token = Canvas::Embed.generate_token(key_hex, scopes, 7200, "usr_test123")
|
15
17
|
render json: { 'token' => token }
|
16
18
|
end
|
17
19
|
end
|
data/example/log/development.log
CHANGED
@@ -30,3 +30,283 @@ Processing by ApplicationController#generate_token as */*
|
|
30
30
|
Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms | Allocations: 167)
|
31
31
|
|
32
32
|
|
33
|
+
Started GET "/generate_token?scopes=%7B%20%22company%22:%20%22ford.com%22%7D" for ::1 at 2023-11-07 15:24:31 -0800
|
34
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
35
|
+
Processing by ApplicationController#generate_token as */*
|
36
|
+
Parameters: {"scopes"=>"{ \"company\": \"ford.com\"}"}
|
37
|
+
Completed 500 Internal Server Error in 1ms (ActiveRecord: 0.0ms | Allocations: 1287)
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
NoMethodError (undefined method `generate_token' for Canvas::Embed:Module):
|
42
|
+
|
43
|
+
app/controllers/application_controller.rb:14:in `generate_token'
|
44
|
+
Started GET "/generate_token?scopes=%7B%20%22company%22:%20%22ford.co%22%7D" for ::1 at 2023-11-07 15:25:10 -0800
|
45
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
46
|
+
|
47
|
+
LoadError (cannot load such file -- canvas-embed):
|
48
|
+
|
49
|
+
app/controllers/application_controller.rb:3:in `<main>'
|
50
|
+
Started GET "/generate_token?scopes=%7B%20%22company%22:%20%22ford.com%22%7D" for ::1 at 2023-11-07 15:25:11 -0800
|
51
|
+
|
52
|
+
LoadError (cannot load such file -- canvas-embed):
|
53
|
+
|
54
|
+
app/controllers/application_controller.rb:3:in `<main>'
|
55
|
+
Started GET "/generate_token?scopes=%7B%20%22company%22:%20%22ford.co%22%7D" for ::1 at 2023-11-07 15:25:29 -0800
|
56
|
+
Processing by ApplicationController#generate_token as */*
|
57
|
+
Parameters: {"scopes"=>"{ \"company\": \"ford.co\"}"}
|
58
|
+
Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.0ms | Allocations: 1284)
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
NoMethodError (undefined method `generate_token' for Canvas::Embed:Module):
|
63
|
+
|
64
|
+
app/controllers/application_controller.rb:16:in `generate_token'
|
65
|
+
Started GET "/generate_token?scopes=%7B%20%22company%22:%20%22ford.com%22%7D" for ::1 at 2023-11-07 15:25:29 -0800
|
66
|
+
Processing by ApplicationController#generate_token as */*
|
67
|
+
Parameters: {"scopes"=>"{ \"company\": \"ford.com\"}"}
|
68
|
+
Completed 500 Internal Server Error in 1ms (ActiveRecord: 0.0ms | Allocations: 465)
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
NoMethodError (undefined method `generate_token' for Canvas::Embed:Module):
|
73
|
+
|
74
|
+
app/controllers/application_controller.rb:16:in `generate_token'
|
75
|
+
Started GET "/generate_token?scopes=%7B%20%22company%22:%20%22ford.co%22%7D" for ::1 at 2023-11-07 15:25:59 -0800
|
76
|
+
Processing by ApplicationController#generate_token as */*
|
77
|
+
Parameters: {"scopes"=>"{ \"company\": \"ford.co\"}"}
|
78
|
+
Completed 500 Internal Server Error in 0ms (ActiveRecord: 0.0ms | Allocations: 449)
|
79
|
+
|
80
|
+
|
81
|
+
|
82
|
+
NoMethodError (undefined method `generate_token' for Canvas::Embed:Module):
|
83
|
+
|
84
|
+
app/controllers/application_controller.rb:16:in `generate_token'
|
85
|
+
Started GET "/generate_token?scopes=%7B%20%22company%22:%20%22ford.com%22%7D" for ::1 at 2023-11-07 15:25:59 -0800
|
86
|
+
Processing by ApplicationController#generate_token as */*
|
87
|
+
Parameters: {"scopes"=>"{ \"company\": \"ford.com\"}"}
|
88
|
+
Completed 500 Internal Server Error in 1ms (ActiveRecord: 0.0ms | Allocations: 465)
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
NoMethodError (undefined method `generate_token' for Canvas::Embed:Module):
|
93
|
+
|
94
|
+
app/controllers/application_controller.rb:16:in `generate_token'
|
95
|
+
Started GET "/generate_token?scopes=%7B%20%22company%22:%20%22ford.co%22%7D" for ::1 at 2023-11-07 15:26:43 -0800
|
96
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
97
|
+
Processing by ApplicationController#generate_token as */*
|
98
|
+
Parameters: {"scopes"=>"{ \"company\": \"ford.co\"}"}
|
99
|
+
Completed 500 Internal Server Error in 1ms (ActiveRecord: 0.0ms | Allocations: 1291)
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
NoMethodError (undefined method `generate_token' for Canvas::Embed:Module):
|
104
|
+
|
105
|
+
app/controllers/application_controller.rb:16:in `generate_token'
|
106
|
+
Started GET "/generate_token?scopes=%7B%20%22company%22:%20%22ford.com%22%7D" for ::1 at 2023-11-07 15:26:44 -0800
|
107
|
+
Processing by ApplicationController#generate_token as */*
|
108
|
+
Parameters: {"scopes"=>"{ \"company\": \"ford.com\"}"}
|
109
|
+
Completed 500 Internal Server Error in 1ms (ActiveRecord: 0.0ms | Allocations: 469)
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
NoMethodError (undefined method `generate_token' for Canvas::Embed:Module):
|
114
|
+
|
115
|
+
app/controllers/application_controller.rb:16:in `generate_token'
|
116
|
+
Started GET "/generate_token?scopes=%7B%20%22company%22:%20%22ford.co%22%7D" for ::1 at 2023-11-07 15:27:00 -0800
|
117
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.0ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
118
|
+
Processing by ApplicationController#generate_token as */*
|
119
|
+
Parameters: {"scopes"=>"{ \"company\": \"ford.co\"}"}
|
120
|
+
Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.0ms | Allocations: 1291)
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
NoMethodError (undefined method `generate_token' for Canvas::Embed:Module):
|
125
|
+
|
126
|
+
app/controllers/application_controller.rb:14:in `generate_token'
|
127
|
+
Started GET "/generate_token?scopes=%7B%20%22company%22:%20%22ford.com%22%7D" for ::1 at 2023-11-07 15:27:01 -0800
|
128
|
+
Processing by ApplicationController#generate_token as */*
|
129
|
+
Parameters: {"scopes"=>"{ \"company\": \"ford.com\"}"}
|
130
|
+
Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.0ms | Allocations: 469)
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
NoMethodError (undefined method `generate_token' for Canvas::Embed:Module):
|
135
|
+
|
136
|
+
app/controllers/application_controller.rb:14:in `generate_token'
|
137
|
+
Started GET "/generate_token?scopes=%7B%20%22company%22:%20%22ford.co%22%7D" for ::1 at 2023-11-07 15:27:55 -0800
|
138
|
+
|
139
|
+
TypeError (wrong argument type String (expected Module)):
|
140
|
+
|
141
|
+
app/controllers/application_controller.rb:3:in `include'
|
142
|
+
app/controllers/application_controller.rb:3:in `<main>'
|
143
|
+
Started GET "/generate_token?scopes=%7B%20%22company%22:%20%22ford.com%22%7D" for ::1 at 2023-11-07 15:27:57 -0800
|
144
|
+
|
145
|
+
TypeError (wrong argument type String (expected Module)):
|
146
|
+
|
147
|
+
app/controllers/application_controller.rb:3:in `include'
|
148
|
+
app/controllers/application_controller.rb:3:in `<main>'
|
149
|
+
Started GET "/generate_token?scopes=%7B%20%22company%22:%20%22ford.co%22%7D" for ::1 at 2023-11-07 15:28:04 -0800
|
150
|
+
Processing by ApplicationController#generate_token as */*
|
151
|
+
Parameters: {"scopes"=>"{ \"company\": \"ford.co\"}"}
|
152
|
+
Completed 500 Internal Server Error in 0ms (ActiveRecord: 0.0ms | Allocations: 449)
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
NoMethodError (undefined method `generate_token' for Canvas::Embed:Module):
|
157
|
+
|
158
|
+
app/controllers/application_controller.rb:16:in `generate_token'
|
159
|
+
Started GET "/generate_token?scopes=%7B%20%22company%22:%20%22ford.com%22%7D" for ::1 at 2023-11-07 15:28:05 -0800
|
160
|
+
Processing by ApplicationController#generate_token as */*
|
161
|
+
Parameters: {"scopes"=>"{ \"company\": \"ford.com\"}"}
|
162
|
+
Completed 500 Internal Server Error in 1ms (ActiveRecord: 0.0ms | Allocations: 467)
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
NoMethodError (undefined method `generate_token' for Canvas::Embed:Module):
|
167
|
+
|
168
|
+
app/controllers/application_controller.rb:16:in `generate_token'
|
169
|
+
Started GET "/generate_token?scopes=%7B%20%22company%22:%20%22ford.co%22%7D" for ::1 at 2023-11-07 15:28:59 -0800
|
170
|
+
Processing by ApplicationController#generate_token as */*
|
171
|
+
Parameters: {"scopes"=>"{ \"company\": \"ford.co\"}"}
|
172
|
+
Completed 500 Internal Server Error in 0ms (ActiveRecord: 0.0ms | Allocations: 448)
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
NoMethodError (undefined method `generate_token' for Canvas::Embed:Module):
|
177
|
+
|
178
|
+
app/controllers/application_controller.rb:16:in `generate_token'
|
179
|
+
Started GET "/generate_token?scopes=%7B%20%22company%22:%20%22ford.com%22%7D" for ::1 at 2023-11-07 15:29:08 -0800
|
180
|
+
Processing by ApplicationController#generate_token as */*
|
181
|
+
Parameters: {"scopes"=>"{ \"company\": \"ford.com\"}"}
|
182
|
+
Completed 500 Internal Server Error in 1ms (ActiveRecord: 0.0ms | Allocations: 454)
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
NameError (uninitialized constant Canvas::Emned):
|
187
|
+
|
188
|
+
app/controllers/application_controller.rb:16:in `generate_token'
|
189
|
+
Started GET "/generate_token?scopes=%7B%20%22company%22:%20%22ford.co%22%7D" for ::1 at 2023-11-07 15:29:16 -0800
|
190
|
+
Processing by ApplicationController#generate_token as */*
|
191
|
+
Parameters: {"scopes"=>"{ \"company\": \"ford.co\"}"}
|
192
|
+
Completed 500 Internal Server Error in 0ms (ActiveRecord: 0.0ms | Allocations: 456)
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
NoMethodError (undefined method `generate_token' for Canvas::Embed:Module):
|
197
|
+
|
198
|
+
app/controllers/application_controller.rb:17:in `generate_token'
|
199
|
+
Started GET "/generate_token?scopes=%7B%20%22company%22:%20%22ford.com%22%7D" for ::1 at 2023-11-07 15:29:20 -0800
|
200
|
+
Processing by ApplicationController#generate_token as */*
|
201
|
+
Parameters: {"scopes"=>"{ \"company\": \"ford.com\"}"}
|
202
|
+
Completed 500 Internal Server Error in 1ms (ActiveRecord: 0.0ms | Allocations: 469)
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
NoMethodError (undefined method `generate_token' for Canvas::Embed:Module):
|
207
|
+
|
208
|
+
app/controllers/application_controller.rb:17:in `generate_token'
|
209
|
+
Started GET "/generate_token?scopes=%7B%20%22company%22:%20%22ford.co%22%7D" for ::1 at 2023-11-07 15:29:34 -0800
|
210
|
+
Processing by ApplicationController#generate_token as */*
|
211
|
+
Parameters: {"scopes"=>"{ \"company\": \"ford.co\"}"}
|
212
|
+
Completed 500 Internal Server Error in 0ms (ActiveRecord: 0.0ms | Allocations: 453)
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
NoMethodError (undefined method `generate_token' for Canvas::Embed:Module):
|
217
|
+
|
218
|
+
app/controllers/application_controller.rb:17:in `generate_token'
|
219
|
+
Started GET "/generate_token?scopes=%7B%20%22company%22:%20%22ford.com%22%7D" for ::1 at 2023-11-07 15:29:35 -0800
|
220
|
+
Processing by ApplicationController#generate_token as */*
|
221
|
+
Parameters: {"scopes"=>"{ \"company\": \"ford.com\"}"}
|
222
|
+
Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.0ms | Allocations: 469)
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
NoMethodError (undefined method `generate_token' for Canvas::Embed:Module):
|
227
|
+
|
228
|
+
app/controllers/application_controller.rb:17:in `generate_token'
|
229
|
+
Started GET "/generate_token?scopes=%7B%20%22company%22:%20%22ford.co%22%7D" for ::1 at 2023-11-07 15:30:53 -0800
|
230
|
+
Processing by ApplicationController#generate_token as */*
|
231
|
+
Parameters: {"scopes"=>"{ \"company\": \"ford.co\"}"}
|
232
|
+
Completed 500 Internal Server Error in 0ms (ActiveRecord: 0.0ms | Allocations: 448)
|
233
|
+
|
234
|
+
|
235
|
+
|
236
|
+
NoMethodError (undefined method `generate_token' for Canvas::Embed:Module):
|
237
|
+
|
238
|
+
app/controllers/application_controller.rb:16:in `generate_token'
|
239
|
+
Started GET "/generate_token?scopes=%7B%20%22company%22:%20%22ford.com%22%7D" for ::1 at 2023-11-07 15:30:53 -0800
|
240
|
+
Processing by ApplicationController#generate_token as */*
|
241
|
+
Parameters: {"scopes"=>"{ \"company\": \"ford.com\"}"}
|
242
|
+
Completed 500 Internal Server Error in 1ms (ActiveRecord: 0.0ms | Allocations: 467)
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
NoMethodError (undefined method `generate_token' for Canvas::Embed:Module):
|
247
|
+
|
248
|
+
app/controllers/application_controller.rb:16:in `generate_token'
|
249
|
+
Started GET "/generate_token?scopes=%7B%20%22company%22:%20%22ford.co%22%7D" for ::1 at 2023-11-07 15:32:51 -0800
|
250
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
251
|
+
Processing by ApplicationController#generate_token as */*
|
252
|
+
Parameters: {"scopes"=>"{ \"company\": \"ford.co\"}"}
|
253
|
+
Completed 500 Internal Server Error in 1ms (ActiveRecord: 0.0ms | Allocations: 1291)
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
NoMethodError (undefined method `generate_token' for Canvas::Embed:Module):
|
258
|
+
|
259
|
+
app/controllers/application_controller.rb:16:in `generate_token'
|
260
|
+
Started GET "/generate_token?scopes=%7B%20%22company%22:%20%22ford.com%22%7D" for ::1 at 2023-11-07 15:32:52 -0800
|
261
|
+
Processing by ApplicationController#generate_token as */*
|
262
|
+
Parameters: {"scopes"=>"{ \"company\": \"ford.com\"}"}
|
263
|
+
Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.0ms | Allocations: 469)
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
NoMethodError (undefined method `generate_token' for Canvas::Embed:Module):
|
268
|
+
|
269
|
+
app/controllers/application_controller.rb:16:in `generate_token'
|
270
|
+
Started GET "/generate_token?scopes=%7B%20%22company%22:%20%22ford.cm%22%7D" for ::1 at 2023-11-07 15:33:37 -0800
|
271
|
+
Processing by ApplicationController#generate_token as */*
|
272
|
+
Parameters: {"scopes"=>"{ \"company\": \"ford.cm\"}"}
|
273
|
+
Completed 500 Internal Server Error in 0ms (ActiveRecord: 0.0ms | Allocations: 456)
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
NoMethodError (undefined method `generate_token' for Canvas::Embed:Module):
|
278
|
+
|
279
|
+
app/controllers/application_controller.rb:17:in `generate_token'
|
280
|
+
Started GET "/generate_token?scopes=%7B%20%22company%22:%20%22ford.com%22%7D" for ::1 at 2023-11-07 15:33:38 -0800
|
281
|
+
Processing by ApplicationController#generate_token as */*
|
282
|
+
Parameters: {"scopes"=>"{ \"company\": \"ford.com\"}"}
|
283
|
+
Completed 500 Internal Server Error in 1ms (ActiveRecord: 0.0ms | Allocations: 471)
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
NoMethodError (undefined method `generate_token' for Canvas::Embed:Module):
|
288
|
+
|
289
|
+
app/controllers/application_controller.rb:17:in `generate_token'
|
290
|
+
Started GET "/generate_token?scopes=%7B%20%22company%22:%20%22ford.cm%22%7D" for ::1 at 2023-11-07 15:33:54 -0800
|
291
|
+
Processing by ApplicationController#generate_token as */*
|
292
|
+
Parameters: {"scopes"=>"{ \"company\": \"ford.cm\"}"}
|
293
|
+
Completed 500 Internal Server Error in 1ms (ActiveRecord: 0.0ms | Allocations: 791)
|
294
|
+
|
295
|
+
|
296
|
+
|
297
|
+
NoMethodError (undefined method `generate_token' for Canvas::Embed:Module):
|
298
|
+
|
299
|
+
app/controllers/application_controller.rb:17:in `generate_token'
|
300
|
+
Started GET "/generate_token?scopes=%7B%20%22company%22:%20%22ford.cm%22%7D" for ::1 at 2023-11-07 15:36:02 -0800
|
301
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
302
|
+
Processing by ApplicationController#generate_token as */*
|
303
|
+
Parameters: {"scopes"=>"{ \"company\": \"ford.cm\"}"}
|
304
|
+
Completed 200 OK in 2ms (Views: 0.1ms | ActiveRecord: 0.0ms | Allocations: 1170)
|
305
|
+
|
306
|
+
|
307
|
+
Started GET "/generate_token?scopes=%7B%20%22company%22:%20%22ford.com%22%7D" for ::1 at 2023-11-07 15:36:02 -0800
|
308
|
+
Processing by ApplicationController#generate_token as */*
|
309
|
+
Parameters: {"scopes"=>"{ \"company\": \"ford.com\"}"}
|
310
|
+
Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms | Allocations: 144)
|
311
|
+
|
312
|
+
|
Binary file
|
File without changes
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/example/tmp/pids/server.pid
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
56214
|
data/lib/canvas/embed/version.rb
CHANGED
data/lib/canvas/embed.rb
CHANGED
Binary file
|
data/spec/canvas/embed_spec.rb
CHANGED
@@ -19,7 +19,7 @@ RSpec.describe Canvas::Embed do
|
|
19
19
|
|
20
20
|
original_message = { 'team' => 'canvas' }
|
21
21
|
|
22
|
-
token = Canvas::
|
22
|
+
token = Canvas::Embed.generate_token(unpacked_key, original_message)
|
23
23
|
expect(token).not_to be nil
|
24
24
|
|
25
25
|
decoded = JSON.parse(Base64.decode64(token))
|
@@ -44,14 +44,14 @@ RSpec.describe Canvas::Embed do
|
|
44
44
|
key = RbNaCl::Random.random_bytes(RbNaCl::SecretBox.key_bytes)
|
45
45
|
unpacked_key = "emk_ZRzQbE9d.#{key.unpack1('H*')}"
|
46
46
|
original_message = "'team': 'canvas'"
|
47
|
-
expect { Canvas::
|
47
|
+
expect { Canvas::Embed.generate_token(unpacked_key, original_message) }.to raise_error(Canvas::InvalidScopeError)
|
48
48
|
end
|
49
49
|
|
50
50
|
it 'accepts custom expiration and userId' do
|
51
51
|
key = RbNaCl::Random.random_bytes(RbNaCl::SecretBox.key_bytes)
|
52
52
|
unpacked_key = "emk_ZRzQbE9d.#{key.unpack1('H*')}"
|
53
53
|
original_message = { 'team' => 'canvas' }
|
54
|
-
token = Canvas::
|
54
|
+
token = Canvas::Embed.generate_token(unpacked_key, original_message, 7200, "cus_abc123")
|
55
55
|
expect(token).not_to be nil
|
56
56
|
decoded = JSON.parse(Base64.decode64(token))
|
57
57
|
expect(decoded['keyId']).to eq('emk_ZRzQbE9d')
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: canvas-embed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Will Pride
|
@@ -93,6 +93,8 @@ files:
|
|
93
93
|
- example/config/storage.yml
|
94
94
|
- example/log/development.log
|
95
95
|
- example/storage/development.sqlite3
|
96
|
+
- example/storage/development.sqlite3-shm
|
97
|
+
- example/storage/development.sqlite3-wal
|
96
98
|
- example/tmp/cache/bootsnap/compile-cache-iseq/00/47f4f1a378e4f3
|
97
99
|
- example/tmp/cache/bootsnap/compile-cache-iseq/00/adaa3c79791768
|
98
100
|
- example/tmp/cache/bootsnap/compile-cache-iseq/00/aea96502258cc3
|
@@ -1414,6 +1416,7 @@ files:
|
|
1414
1416
|
- example/tmp/cache/bootsnap/compile-cache-iseq/b2/7702d3d8709e10
|
1415
1417
|
- example/tmp/cache/bootsnap/compile-cache-iseq/b2/bcfc7147918ee9
|
1416
1418
|
- example/tmp/cache/bootsnap/compile-cache-iseq/b2/c3b52c4862931e
|
1419
|
+
- example/tmp/cache/bootsnap/compile-cache-iseq/b2/d451a148d6d303
|
1417
1420
|
- example/tmp/cache/bootsnap/compile-cache-iseq/b3/08f99db6a2f454
|
1418
1421
|
- example/tmp/cache/bootsnap/compile-cache-iseq/b3/2928ee05dee54a
|
1419
1422
|
- example/tmp/cache/bootsnap/compile-cache-iseq/b3/5e2f2005224107
|
@@ -1689,6 +1692,7 @@ files:
|
|
1689
1692
|
- example/tmp/cache/bootsnap/compile-cache-iseq/d8/7cf9cd6b97ce3e
|
1690
1693
|
- example/tmp/cache/bootsnap/compile-cache-iseq/d8/8e9b55d3c27632
|
1691
1694
|
- example/tmp/cache/bootsnap/compile-cache-iseq/d8/d4be612eb65cc7
|
1695
|
+
- example/tmp/cache/bootsnap/compile-cache-iseq/d8/fff5874ac0039e
|
1692
1696
|
- example/tmp/cache/bootsnap/compile-cache-iseq/d9/00dae66024922b
|
1693
1697
|
- example/tmp/cache/bootsnap/compile-cache-iseq/d9/4752982ff62455
|
1694
1698
|
- example/tmp/cache/bootsnap/compile-cache-iseq/d9/57d00f31fb9cc2
|
@@ -2010,6 +2014,7 @@ files:
|
|
2010
2014
|
- example/tmp/restart.txt
|
2011
2015
|
- lib/canvas/embed.rb
|
2012
2016
|
- lib/canvas/embed/version.rb
|
2017
|
+
- pkg/canvas-embed-0.1.5.gem
|
2013
2018
|
- sig/canvas/embed.rbs
|
2014
2019
|
- spec/canvas/embed_spec.rb
|
2015
2020
|
- spec/spec_helper.rb
|