File tree 1 file changed +11
-0
lines changed
app/services/lti13_service
1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,14 @@ def call
11
11
Rails . logger . info "Fetching client assertion from ClientCredentialsJwt"
12
12
client_assertion = Lti13Service ::ClientCredentialsJwt . new ( @lms_instance ) . call
13
13
Rails . logger . info "Client assertion (JWT) generated: #{ client_assertion } "
14
+
15
+ # debug the LTI claims and scopes pulled from lti scopes & claims
16
+ Rails . logger . info "LTI claims and scopes configuration: #{ Rails . configuration . lti_claims_and_scopes . inspect } "
17
+ Rails . logger . info "Line Item Scope: #{ Rails . configuration . lti_claims_and_scopes [ 'ags_scope_line_item' ] } "
18
+ Rails . logger . info "Result Scope: #{ Rails . configuration . lti_claims_and_scopes [ 'ags_scope_result' ] } "
19
+ Rails . logger . info "Score Scope: #{ Rails . configuration . lti_claims_and_scopes [ 'ags_scope_score' ] } "
20
+ Rails . logger . info "Names and Roles Scope: #{ Rails . configuration . lti_claims_and_scopes [ 'names_and_roles_scope' ] } "
21
+
14
22
# Build the request body for the token request
15
23
request_body = {
16
24
grant_type : 'client_credentials' ,
@@ -24,6 +32,9 @@ def call
24
32
client_assertion : client_assertion
25
33
} . to_query
26
34
35
+ # Log the complete request body
36
+ Rails . logger . info "Request body with scopes: #{ request_body } "
37
+
27
38
# Establish a connection to the LMS's OAuth2 endpoint using Faraday
28
39
conn = Faraday . new ( url : @lms_instance . oauth2_url ) do |faraday |
29
40
faraday . headers [ 'Content-Type' ] = 'application/x-www-form-urlencoded'
You can’t perform that action at this time.
0 commit comments