public class AnonymousLoginModule extends AbstractLoginModule
Logs in a user based solely on IP address; no other authentication is performed. Barring a mis-configuration or I/O error, this LoginModule always succeeds.
This module must be used with a CallbackHandler (such asWebContainerCallbackHandler
) that supports the following Callback
types:
HttpRequestCallback
- supplies the IP address, which is used as
a backup in case no name is supplied.After authentication, a generic WikiPrincipal based on the IP address will be created and associated with the Subject.
Modifier and Type | Field and Description |
---|---|
protected static org.apache.log4j.Logger |
log |
static String |
PROMPT
Bogus prompt sent to the callback handler.
|
m_handler, m_options, m_principals, m_state, m_subject, NULL
Constructor and Description |
---|
AnonymousLoginModule() |
Modifier and Type | Method and Description |
---|---|
boolean |
login()
Logs in the user by calling back to the registered CallbackHandler with an
HttpRequestCallback.
|
abort, commit, initialize, logout
public static final String PROMPT
protected static final org.apache.log4j.Logger log
public AnonymousLoginModule()
public boolean login() throws LoginException
login
in interface LoginModule
login
in class AbstractLoginModule
true
.{@inheritDoc}
LoginException
- if the authentication failsLoginModule.login()
Copyright © 2001-2019 The Apache Software Foundation. All rights reserved.