bright 2.1.2 → 2.2.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/lib/bright/sis_apis/one_roster/aeries.rb +38 -0
- data/lib/bright/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c6fa2d83e3e42ccc235ef1892288bd3cbe8e0013415476abd95e7f74613deec6
|
|
4
|
+
data.tar.gz: 51994daa0919dec7e1e65723acb82a9610802f4f274ad5a6926e163d76ef8a8c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b86b204e80ef3f4629ad33bb557c5d01ca965c359ff5ac77391087f482a0c99320a14f57d83715e6c1c88cb31c0ecd462bc2bc1b2502b31845de1bf922046bfd
|
|
7
|
+
data.tar.gz: b4f73c066be2efc98cd1f000c55f3fcc0d6df7ee1c55073caef62d33d06d26b2be6ba001513db92e019ae11a8c2669ebbe83c3f4e7343d332f8dbe8827e2d265
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
module Bright
|
|
2
|
+
module SisApi
|
|
3
|
+
class OneRoster::Aeries < OneRoster
|
|
4
|
+
def initialize(options = {})
|
|
5
|
+
self.connection_options = options[:connection] || {}
|
|
6
|
+
# https://support.aeries.com/support/solutions/articles/14000065677-oneroster-api-authentication-process
|
|
7
|
+
# ALL of the below are required
|
|
8
|
+
# {
|
|
9
|
+
# :client_id => "",
|
|
10
|
+
# :client_secret => "",
|
|
11
|
+
# :uri => "",
|
|
12
|
+
# :token_uri => "",
|
|
13
|
+
# :scope => ""
|
|
14
|
+
# }
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def retrieve_access_token
|
|
18
|
+
connection = Bright::Connection.new(connection_options[:token_uri])
|
|
19
|
+
response = connection.request(:post,
|
|
20
|
+
{
|
|
21
|
+
"grant_type" => "client_credentials",
|
|
22
|
+
"username" => connection_options[:client_id],
|
|
23
|
+
"password" => connection_options[:client_secret],
|
|
24
|
+
"scope" => connection_options[:scope]
|
|
25
|
+
},
|
|
26
|
+
headers_for_access_token)
|
|
27
|
+
if !response.error?
|
|
28
|
+
response_hash = JSON.parse(response.body)
|
|
29
|
+
end
|
|
30
|
+
if response_hash["access_token"]
|
|
31
|
+
connection_options[:access_token] = response_hash["access_token"]
|
|
32
|
+
connection_options[:access_token_expires] = (Time.now - 10) + response_hash["expires_in"]
|
|
33
|
+
end
|
|
34
|
+
response_hash
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
data/lib/bright/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bright
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Arux Software
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-09-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: httpi
|
|
@@ -130,6 +130,7 @@ files:
|
|
|
130
130
|
- lib/bright/sis_apis/bright_sis.rb
|
|
131
131
|
- lib/bright/sis_apis/focus.rb
|
|
132
132
|
- lib/bright/sis_apis/one_roster.rb
|
|
133
|
+
- lib/bright/sis_apis/one_roster/aeries.rb
|
|
133
134
|
- lib/bright/sis_apis/one_roster/infinite_campus.rb
|
|
134
135
|
- lib/bright/sis_apis/one_roster/skyward.rb
|
|
135
136
|
- lib/bright/sis_apis/power_school.rb
|