IUserExt
const mixin IUserExt : SysExt
User management system extension
Authenticate a web request and return an authenticated Context for the given rt
Lookup a user by Ref id, Str username or Filter
abstract Context? authenticate(WebReq req, WebRes res, Runtime rt, Dict? opts := null)
Authenticate a web request and return an authenticated Context for the given rt. The context will be installed to current actor if authentication is successful. If the request is not authenticated then redirect to login page and return null.
Options:
- skipLogin: do not redirect to the login page when the request is
not authenticated; return null instead. Used to serve public
content such as websites where an anonymous visitor is expected,
but a logged in user should still be seen as themselves. The
caller creates a
guestcontext for the null result.
abstract User? read(Obj username, Bool checked := true)
Lookup a user by Ref id, Str username or Filter. If not found then raise exception or return null based on the checked flag.