atomic_lti 1.8.1 → 1.8.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c5a9ab9e61066b4cf5a463e83db17a6ffbded2fce44251b5506dbfb7a385d1df
4
- data.tar.gz: 1922245e4850a6f2baa0cf7cd44a6ae05c3d2937ee957c8ddca46299fa10d302
3
+ metadata.gz: 89a9c7396e05d12765f64f866f1708eb07d66e5088798e20e5357cf9c92bce4d
4
+ data.tar.gz: fb98ae12559896877d54bdb0e13526005198efc04d72004181236d99010289dd
5
5
  SHA512:
6
- metadata.gz: 8e1506ff8b48c8b65164be73cf73408a102af3235f6b1a241068ddca74c57bf8b5c7241e7f5308bf3152a2e6e3bb5288afc7c32aa36d2ef95f896e5ed62bf4ed
7
- data.tar.gz: 6a114eefe55c0337690997eaa274685eb3025956a1ac82927c595cd6d716436a1ac2384a2155d568eece1fa002a96e0faa4c3226c9f0c6eb64bcb1328bdeaca7
6
+ metadata.gz: 47096d099f5370ff31d83d0e4365e78b7f6663528591bebb8d25540c10ff06fbf99be694178cca009ff825e72d8b58c37bb283b5b081c81c5728377978ea92bb
7
+ data.tar.gz: 07112ad65fa251c9191e639fe4ad8d56c2fcccf4160b8e4c3b5c94ebb85f11b4e4c23c4b7f8a9cb1fff2ea492919eb5db3caee948bf03bf78d3d88bf80dabf72
@@ -64,7 +64,7 @@ module AtomicLti
64
64
  payload = {
65
65
  iss: install.client_id, # A unique identifier for the entity that issued the JWT
66
66
  sub: install.client_id, # "client_id" of the OAuth Client
67
- aud: platform.token_url, # Authorization server identifier
67
+ aud: [platform.authorization_server || platform.token_url], # Authorization server identifier
68
68
  iat: Time.now.to_i, # Timestamp for when the JWT was created
69
69
  exp: Time.now.to_i + 300, # Timestamp for when the JWT should be treated as having expired
70
70
  # (after allowing a margin for clock skew)
@@ -119,7 +119,6 @@ module AtomicLti
119
119
  def self.request_token_uncached(iss:, deployment_id:, scopes:)
120
120
  # Details here:
121
121
  # https://www.imsglobal.org/spec/security/v1p0/#using-json-web-tokens-with-oauth-2-0-client-credentials-grant
122
- puts "GETTING TOKEN"
123
122
  body = {
124
123
  grant_type: "client_credentials",
125
124
  client_assertion_type: "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
@@ -94,6 +94,8 @@ module AtomicLti
94
94
  end
95
95
  end
96
96
 
97
+ class InvalidOIDCRegistrationEndpoint < AtomicLtiException; end
98
+
97
99
  class PaginationLimitExceeded < AtomicLtiException
98
100
  end
99
101
  end
@@ -2,9 +2,8 @@ module AtomicLti
2
2
  module Services
3
3
  class NamesAndRoles < AtomicLti::Services::Base
4
4
 
5
- def initialize(id_token_decoded: nil, iss: nil, deployment_id: nil, context_memberships_url: nil)
6
- @context_memberships_url = context_memberships_url || id_token_decoded.dig(AtomicLti::Definitions::NAMES_AND_ROLES_CLAIM, "context_memberships_url")
7
- super(id_token_decoded:, iss:, deployment_id:)
5
+ def initialize(id_token_decoded:)
6
+ super(id_token_decoded: id_token_decoded)
8
7
  end
9
8
 
10
9
  def scopes
@@ -0,0 +1,5 @@
1
+ class AddPlatformAuthorizationServer < ActiveRecord::Migration[7.0]
2
+ def change
3
+ add_column :atomic_lti_platforms, :authorization_server, :string
4
+ end
5
+ end
@@ -1,3 +1,3 @@
1
1
  module AtomicLti
2
- VERSION = "1.8.1".freeze
2
+ VERSION = "1.8.3".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: atomic_lti
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.1
4
+ version: 1.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Petro
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2024-03-14 00:00:00.000000000 Z
13
+ date: 2024-06-12 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: pg
@@ -105,6 +105,7 @@ files:
105
105
  - db/migrate/20220503003528_create_atomic_lti_jwks.rb
106
106
  - db/migrate/20221010140920_create_open_id_state.rb
107
107
  - db/migrate/20230726040941_add_state_to_open_id_state.rb
108
+ - db/migrate/20240612163118_add_platform_authorization_server.rb
108
109
  - db/seeds.rb
109
110
  - lib/atomic_lti.rb
110
111
  - lib/atomic_lti/engine.rb
@@ -133,7 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
133
134
  - !ruby/object:Gem::Version
134
135
  version: '0'
135
136
  requirements: []
136
- rubygems_version: 3.4.10
137
+ rubygems_version: 3.4.19
137
138
  signing_key:
138
139
  specification_version: 4
139
140
  summary: AtomicLti implements the LTI Advantage specification.