Package | Description |
---|---|
sirius.web.controller |
Provides the controller part of a simple MVC framework.
|
sirius.web.security |
Modifier and Type | Method and Description |
---|---|
protected UserInfo |
BasicController.getUser()
Obtains the currently active user.
|
Modifier and Type | Method and Description |
---|---|
protected String |
Route.checkAuth(UserInfo user)
Determines if the current user is authorized to access this routing.
|
Modifier and Type | Field and Description |
---|---|
protected UserInfo |
GenericUserManager.defaultUser |
static UserInfo |
UserInfo.NOBODY
Fallback user if no user is currently available.
|
Modifier and Type | Field and Description |
---|---|
protected Function<UserInfo,UserSettings> |
UserInfo.settingsSupplier |
protected Function<UserInfo,Object> |
UserInfo.userSupplier |
Modifier and Type | Method and Description |
---|---|
UserInfo |
PublicUserManager.bindToRequest(WebContext ctx) |
UserInfo |
UserManager.bindToRequest(WebContext ctx)
Tries to find the current user in the current session or by checking the request for valid credentials
|
UserInfo |
GenericUserManager.bindToRequest(WebContext ctx) |
UserInfo |
UserInfo.Builder.build()
Builds the user, with the previously given settings.
|
protected UserInfo |
GenericUserManager.buildDefaultUser() |
UserInfo |
PublicUserManager.findUserByCredentials(WebContext ctx,
String user,
String password) |
UserInfo |
UserManager.findUserByCredentials(WebContext ctx,
String user,
String password)
Tries to find a user with the given credentials.
|
UserInfo |
PublicUserManager.findUserByName(WebContext ctx,
String user) |
UserInfo |
UserManager.findUserByName(WebContext ctx,
String user)
Tries to find a user with the given username.
|
UserInfo |
UserManager.findUserForRequest(WebContext ctx)
Tries to find the current user in the current session.
|
UserInfo |
GenericUserManager.findUserForRequest(WebContext ctx) |
protected UserInfo |
GenericUserManager.findUserInSession(WebContext ctx)
Tries to fetch the current user from the current session.
|
static UserInfo |
UserContext.getCurrentUser()
Boilerplate method to quickly access the current user.
|
UserInfo |
UserContext.getUser()
Returns the current user.
|
UserInfo |
UserContext.getUserForScope(ScopeInfo scope)
Returns the used which would be the current user if the space with the given id would be active.
|
Modifier and Type | Method and Description |
---|---|
void |
PublicUserManager.attachToSession(UserInfo user,
WebContext ctx) |
void |
UserManager.attachToSession(UserInfo user,
WebContext ctx)
Makes the currently authenticated user persistent by storing the required information in the session.
|
void |
GenericUserManager.attachToSession(UserInfo user,
WebContext ctx)
Attaches the given user to the current session.
|
void |
PublicUserManager.detachFromSession(UserInfo user,
WebContext ctx) |
void |
UserManager.detachFromSession(UserInfo user,
WebContext ctx)
Removes all stored data from the session
This can be considered a logout operation.
|
void |
GenericUserManager.detachFromSession(UserInfo user,
WebContext ctx)
Removes all stored user information from the current session.
|
protected Object |
PublicUserManager.getUserObject(UserInfo u) |
protected abstract Object |
GenericUserManager.getUserObject(UserInfo user)
Resolves the given user info back into the original (underlying) user object.
|
protected UserSettings |
GenericUserManager.getUserSettings(UserSettings scopeSettings,
UserInfo user)
Fetches the user specific configuration if available.
|
protected void |
GenericUserManager.recordUserLogin(WebContext ctx,
UserInfo user)
Provides a method which can track logins of users.
|
void |
UserContext.runAs(UserInfo user,
Runnable section)
Executes the given section as the given user.
|
void |
UserContext.setCurrentUser(UserInfo user)
Installs the given user as current user.
|
protected void |
GenericUserManager.updateLoginCookie(WebContext ctx,
UserInfo user)
Updates the lifetime of the login cooke if required.
|
Modifier and Type | Method and Description |
---|---|
UserInfo.Builder |
UserInfo.Builder.withSettingsSupplier(Function<UserInfo,UserSettings> settingsSupplier)
Sets a config supplier which can provide an individual configuration for the current user.
|
UserInfo.Builder |
UserInfo.Builder.withUserSupplier(Function<UserInfo,Object> userSupplier)
Sets a user supplier which returns the underlying user object (e.g. a database entity).
|
Copyright © 2018. All rights reserved.