Releases: adlnet/moodle-jwt-auth
Syntax Fix for Role Check
Fixes a syntax issue for the role check function doesPayloadSatisfyRoleRequirement($payload)
.
Level clarification:
function doesPayloadSatisfyRoleRequirement($payload)
to
private function doesPayloadSatisfyRoleRequirement($payload)
and a $this->
object specifier
$satisfiesRoleRequirement = doesPayloadSatisfyRoleRequirement($payload);
to
$satisfiesRoleRequirement = $this->doesPayloadSatisfyRoleRequirement($payload);
Flag to Prevent Auto User Creation
Adds an optional environment flag to prevent automatically creating the user if they did not previously exist.
MOODLE_JWT_PREVENT_AUTO_USER_CREATION
: Prevents user creation for non-existent accounts when set to true
.
Adding Role Requirement
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.
0.16 Release
Small syntax updates and a fix to rare username property execution path.
v0.15
v0.14
v0.13
v0.12
v0.11 - Locking Email by Default
This update will prevent users from changing their email by default, unless permitted by an admin.
Random Password with Configuration
Allows two optional properties to help with the password generation portion.
ASSIGN_RANDOM_PASSWORD_PROPERTY_FIRST
ASSIGN_RANDOM_PASSWORD_PROPERTY_SECOND
These are intended as JWT properties that will be used as part of the password generation function.
Again, this password is never actually accessible, but the goal is to still generate a sufficiently weird password and pass the pipeline stages for plugins within Moodle.