public class SampleSsoAuthenticator extends java.lang.Object implements SsoAuthenticator
SsoAuthenticator.LicensingData, SsoAuthenticator.Result| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
defaultFwdUser
The FWD user returned by default for all in-app users.
|
private static java.lang.String |
SAMPLE_AUTH_BLOB
Example value for SESSION:AUTH-BLOB.
|
private static java.lang.String |
SAMPLE_COOKIE_INVALID_VALUE
Cookie invalid value used to invalidate the cookie.
|
private static java.lang.String |
SAMPLE_COOKIE_NAME
Cookie name used for auto-login.
|
private static java.lang.String |
SAMPLE_COOKIE_PATH
Path for the auth cookie.
|
FWD_SDK_LOGIN_PARAM_PASS, FWD_SDK_LOGIN_PARAM_USER| Constructor and Description |
|---|
SampleSsoAuthenticator() |
| Modifier and Type | Method and Description |
|---|---|
SsoAuthenticator.Result |
authenticate(javax.servlet.http.Cookie[] cookies,
SsoAuthenticator.LicensingData licensingData)
Simulates authentication by cookie.
|
SsoAuthenticator.Result |
authenticate(java.util.Map<java.lang.String,java.lang.String[]> paramMap,
javax.servlet.http.Cookie[] cookies,
SsoAuthenticator.LicensingData licensingData)
First attempts aut-login by validating only the cookies.
|
java.lang.String |
getAuthCookieName()
Returns the hard-coded cookie name used for authentication.
|
java.lang.String |
getLoginPage(java.lang.String loadedTemplate)
Returns null.
|
javax.servlet.http.Cookie |
logout(javax.servlet.http.Cookie[] cookies)
Invalidates the web session associated with the authentication cookie by communicating with the auth
server or updating the DB and returns a cookie with the same name, but invalid value.
|
void |
setOption(java.lang.String option)
Sets the default FWD user.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitialize, terminateprivate static final java.lang.String SAMPLE_COOKIE_NAME
private static final java.lang.String SAMPLE_COOKIE_INVALID_VALUE
private static final java.lang.String SAMPLE_COOKIE_PATH
private static final java.lang.String SAMPLE_AUTH_BLOB
private java.lang.String defaultFwdUser
public SsoAuthenticator.Result authenticate(java.util.Map<java.lang.String,java.lang.String[]> paramMap, javax.servlet.http.Cookie[] cookies, SsoAuthenticator.LicensingData licensingData)
authenticate in interface SsoAuthenticatorparamMap - A map of all query / form params.cookies - All cookies coming with the HTTP request for authentication.licensingData - Data that can be used for enforcing licensing policy.public javax.servlet.http.Cookie logout(javax.servlet.http.Cookie[] cookies)
logout in interface SsoAuthenticatorcookies - The cookie to be returned to the browser and used in the next auth requests.null if the web session / cookie invalidation failed, otherwise an
authentication Cookie with invalid value.public SsoAuthenticator.Result authenticate(javax.servlet.http.Cookie[] cookies, SsoAuthenticator.LicensingData licensingData)
authenticate in interface SsoAuthenticatorcookies - All cookies coming with the HTTP request for authentication.licensingData - Data that can be used for enforcing licensing policy.public java.lang.String getAuthCookieName()
getAuthCookieName in interface SsoAuthenticatorpublic void setOption(java.lang.String option)
setOption in interface SsoAuthenticatoroption - All cookies coming with the HTTP request for authentication.public java.lang.String getLoginPage(java.lang.String loadedTemplate)
getLoginPage in interface SsoAuthenticatorloadedTemplate - The html template loaded from the standard location in the custom root package or null.null.