@Service public class WebProgrammaticLoginImpl extends Object implements com.sun.enterprise.security.web.integration.WebProgrammaticLogin
com.sun.enterprise.security.ee.auth.login.ProgrammaticLogin| Modifier and Type | Field and Description |
|---|---|
static String |
WEBAUTH_PROGRAMMATIC |
| Constructor and Description |
|---|
WebProgrammaticLoginImpl() |
| Modifier and Type | Method and Description |
|---|---|
Boolean |
login(String user,
char[] password,
String realm,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Login and set up principal in request and session.
|
Boolean |
logout(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Logout and remove principal in request and session.
|
public static final String WEBAUTH_PROGRAMMATIC
public Boolean login(String user, char[] password, String realm, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Due to a number of bugs in RI the security context is not shared between web container and ejb container. In order for an identity established by programmatic login to be known to both containers, it needs to be set not only in the security context but also in the current request and, if applicable, the session object. If a session does not exist this method does not create one.
See bugs 4646134, 4688449 and other referenced bugs for more background.
Note also that this login does not hook up into SSO.
login in interface com.sun.enterprise.security.web.integration.WebProgrammaticLoginuser - User name to login.password - User password.request - HTTP request object provided by caller application. It
should be an instance of HttpRequestFacade.response - HTTP response object provided by called application. It
should be an instance of HttpServletResponse. This is not used
currently.realm - the realm name to be authenticated to. If the realm is null,
authentication takes place in default realmException - on login failure.com.sun.enterprise.security.ee.auth.login.ProgrammaticLoginpublic Boolean logout(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
logout in interface com.sun.enterprise.security.web.integration.WebProgrammaticLoginrequest - HTTP request object provided by caller application. It
should be an instance of HttpRequestFacade.response - HTTP response object provided by called application. It
should be an instance of HttpServletResponse. This is not used
currently.Exception - any exception encountered during logout operationcom.sun.enterprise.security.ee.auth.login.ProgrammaticLoginCopyright © 2017–2019 Eclipse Foundation. All rights reserved.