Tech Tip: Custom User Management Using the Legacy “on Rest Authentication” Method
PRODUCT: Qodly Studio | VERSION: 20 R | PLATFORM: Mac & Win
Published On: November 19, 2025
When a custom authentication system uses the legacy On REST Authentication mechanism, a class extending DataStoreImplementation is created with an exposed authentication function, for example:
However, the guest role cannot read the User table, so authentication cannot work by default.
To enable it, a new role such as userAccess must be added in roles.json with:
Class extends DataStoreImplementation exposed Function authentify($identifier : Text; $pwd : Text) : Boolean If ($identifier#"") var $user : cs.UserEntity:=ds.User.query("identifier = :1"; $identifier).first() If ($user#Null) If (Verify password hash($pwd; $user.pwd)) return Session.setPrivileges("Administrator") End if End if End if |
However, the guest role cannot read the User table, so authentication cannot work by default.
To enable it, a new role such as userAccess must be added in roles.json with:
- Read access to the User table
- The authentify function added to the promote list