public class MonitorAuthenticator extends Object implements org.wisdom.api.security.Authenticator
| Modifier and Type | Field and Description |
|---|---|
(package private) org.wisdom.api.configuration.ApplicationConfiguration |
configuration |
private Boolean |
enabled |
static org.slf4j.Logger |
LOGGER |
private String |
username |
| Constructor and Description |
|---|
MonitorAuthenticator() |
| Modifier and Type | Method and Description |
|---|---|
void |
ensureCredentials()
Fails if the username and password are not set in the application configuration.
|
String |
getName() |
String |
getUserName(org.wisdom.api.http.Context context)
Retrieves the username from the HTTP context.
|
org.wisdom.api.http.Result |
onUnauthorized(org.wisdom.api.http.Context context)
Generates an alternative result if the user is not authenticated.
|
org.wisdom.api.configuration.ApplicationConfiguration configuration
public static final org.slf4j.Logger LOGGER
private String username
private Boolean enabled
public void ensureCredentials()
public String getName()
getName in interface org.wisdom.api.security.Authenticatorpublic String getUserName(org.wisdom.api.http.Context context)
getUserName in interface org.wisdom.api.security.Authenticatorcontext - the contextpublic org.wisdom.api.http.Result onUnauthorized(org.wisdom.api.http.Context context)
onUnauthorized in interface org.wisdom.api.security.Authenticatorcontext - the contextCopyright © 2013–2015 Wisdom Framework. All rights reserved.