Adding Role Requirement
Pre-release
Pre-release
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 literaltrue
.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.