oat-sa / lib-lti1p3-core

PHP library for LTI 1.3 Core implementations as platforms and / or as tools.
GNU General Public License v2.0
33 stars 17 forks source link

what is authenticity_token during OIDC Authentication on platform side #158

Open abanghendri opened 1 year ago

abanghendri commented 1 year ago

Hi, I'm buidling LTI Platform using LTI Reference Implementation, during content selection, I redirected to login_initiations on lti-ri, then I click send post request and it bring me to my platform oidc init, I try OidcAuthenticator and authenticate $request, but it fails with message

OIDC authentication failed: Argument 1 passed to OAT\Library\Lti1p3Core\Security\Jwt\Parser\Parser::parse() must be of the type string, null given, called in //vendor/oat-sa/lib-lti1p3-core/src/Security/Oidc/OidcAuthenticator.php on line 82

after I dump the $request, I get parsedBody

array:3 [▼
  "utf8" => "✓"
  "authenticity_token" => "MKLZdolGU4StoBaZDvKSMl0d70BXTXHT2AFIEyPn+1KTCVnKgh64CBzQtMgYZjrCc5lAucV/Z0y4SG3jP03gyg=="
  "commit" => "Send POST request"
]

I have no idea how to auntethicate it, I can't find 'authenticity_token' on this library even on test case, I have no idea which function can handle it, any ideas how to authenticate it?

regards