File tree Expand file tree Collapse file tree 4 files changed +7
-6
lines changed Expand file tree Collapse file tree 4 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,7 @@ $LTI{v1p3}{ClientID} = '';
100
100
$LTI {v1p3 }{DeploymentID } = ' ' ;
101
101
$LTI {v1p3 }{PublicKeysetURL } = ' ' ;
102
102
$LTI {v1p3 }{AccessTokenURL } = ' ' ;
103
+ $LTI {v1p3 }{AccessTokenAUD } = ' ' ;
103
104
$LTI {v1p3 }{AuthReqURL } = ' ' ;
104
105
105
106
# In the process of LTI 1.3 authentication a request is sent to the LMS in response to its
Original file line number Diff line number Diff line change @@ -205,9 +205,9 @@ sub get_credentials ($self) {
205
205
}
206
206
207
207
# Get the target_link_uri from the claims.
208
- $c -> stash-> {LTILauncRedirect } = $claims -> {' https://purl.imsglobal.org/spec/lti/claim/target_link_uri' };
208
+ $c -> stash-> {LTILaunchRedirect } = $claims -> {' https://purl.imsglobal.org/spec/lti/claim/target_link_uri' };
209
209
210
- unless (defined $c -> stash-> {LTILauncRedirect }) {
210
+ unless (defined $c -> stash-> {LTILaunchRedirect }) {
211
211
$self -> {error } = $c -> maketext(
212
212
' There was an error during the login process. Please speak to your instructor or system administrator.' );
213
213
warn ' LTI is not properly configured (failed to obtain target_link_uri). '
@@ -218,7 +218,7 @@ sub get_credentials ($self) {
218
218
219
219
# Get the courseID from the target_link_uri and verify that it is the same as the one that was in the state.
220
220
my $location = $c -> location;
221
- my $target = $c -> url_for($c -> stash-> {LTILauncRedirect })-> path;
221
+ my $target = $c -> url_for($c -> stash-> {LTILaunchRedirect })-> path;
222
222
my $courseID ;
223
223
$courseID = $1 if $target =~ m |$location /([^/]*)| ;
224
224
Original file line number Diff line number Diff line change @@ -137,8 +137,8 @@ async sub get_access_token ($self) {
137
137
my $jwt = eval {
138
138
encode_jwt(
139
139
payload => {
140
- aud => $ce -> {LTI }{v1p3 }{AccessTokenURL },
141
- iss => $c -> url_for( ' root ' ) -> to_abs -> to_string ,
140
+ aud => $ce -> {LTI }{v1p3 }{AccessTokenAUD },
141
+ iss => $ce -> { LTI }{ v1p3 }{ ClientID } ,
142
142
sub => $ce -> {LTI }{v1p3 }{ClientID },
143
143
jti => $private_key -> {kid }
144
144
},
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ sub login ($c) {
24
24
}
25
25
26
26
sub launch ($c ) {
27
- return $c -> redirect_to($c -> systemLink($c -> url_for($c -> stash-> {LTILauncRedirect })));
27
+ return $c -> redirect_to($c -> systemLink($c -> url_for($c -> stash-> {LTILaunchRedirect })));
28
28
}
29
29
30
30
sub keys ($c ) {
You can’t perform that action at this time.
0 commit comments