Skip to content

Adding Role Requirement

Pre-release
Pre-release
Compare
Choose a tag to compare
@vbhayden vbhayden released this 01 Oct 15:34
· 3 commits to master since this release
ed141e0

Adds an optional role requirement for the login process. This check introduces three new optional environment variables:

  • MOODLE_JWT_USE_ROLE_CHECK: Whether to use the role, enabled with string literal true.
  • MOODLE_JWT_REQUIRED_ROLE: The role to expect.
  • MOODLE_JWT_ROLE_FIELD: The JWT property containing the roles array.

If MOODLE_JWT_USE_ROLE_CHECK is present and true, but the other two variables are missing or empty, then the login will fail.