File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -37,13 +37,15 @@ public function launch(Request $request): Response
3737 $ token = $ request ->request ->get ('id_token ' );
3838 $ state = $ request ->request ->get ('state ' );
3939 $ origin = $ request ->headers ->get ('origin ' );
40+ $ blackboardOrigin = false ;
4041
4142 $ client = $ this ->documentManager ->getRepository (LTIClient::class)->findOneBy (['issuer ' => $ origin ]);
4243 if (!$ client ) {
4344 $ client = $ this ->documentManager ->getRepository (LTIClient::class)->findOneBy (['issuer ' => 'https://developer.blackboard.com/ ' ]);
4445 if (!$ client ) {
4546 throw new \Exception ('Client not found. ' );
4647 }
48+ $ blackboardOrigin = true ;
4749 }
4850
4951 $ jwksUri = $ client ->getJWKSUri ();
@@ -57,6 +59,9 @@ public function launch(Request $request): Response
5759 $ userID = $ decodedToken ->{'https://purl.imsglobal.org/spec/lti/claim/custom ' }->userID ;
5860 $ username = $ decodedToken ->{'https://purl.imsglobal.org/spec/lti/claim/custom ' }->username ;
5961 $ mail = $ decodedToken ->{'https://purl.imsglobal.org/spec/lti/claim/custom ' }->person_email ;
62+ if ($ blackboardOrigin ) {
63+ $ mail = $ decodedToken ->{'https://purl.imsglobal.org/spec/lti/claim/custom ' }->person_email_institutional ;
64+ }
6065 $ fullName = $ decodedToken ->{'https://purl.imsglobal.org/spec/lti/claim/custom ' }->person_fullname ;
6166 $ roles = $ decodedToken ->{'https://purl.imsglobal.org/spec/lti/claim/roles ' };
6267
You can’t perform that action at this time.
0 commit comments