@ThreadSafe public final class WikiAuthenticator extends Authenticator implements ISessionListener
function constructingVOWicket( wicCC ) { wicCC.setAuthenticatorClass( Packages.votorola.a.web.wic.authen.WikiAuthenticator ); } function initializingVOWicket( wic ) { wic.authenticator().setCookiePrefix( 'pollwiki' ); } }
Pollwiki configuration changes will usually be required in order for this to work correctly. The pollwiki's cookie domain must match the request domain of the Wicket interface. Also the pollwiki must not send the cookies HttpOnly, which is the default mode.
Modifier and Type | Class and Description |
---|---|
(package private) static class |
WikiAuthenticator.FailureMessage
A container for a failure message that might or might not be localized.
|
PRELOGIN_EMAIL
Constructor and Description |
---|
WikiAuthenticator(VOWicket _app)
Creates a WikiAuthenticator.
|
Modifier and Type | Method and Description |
---|---|
(package private) WikiAuthenticator.FailureMessage |
authenticateEmail(IDPair wikiUser,
CookieHandler cookieRelayer)
Compares two email addresses for the wiki user: (1) the email address
authenticated by the wiki, and (2) the email address implied by the user
identifier.
|
String |
getCookiePrefix()
The prefix used by the pollwiki for cookie names.
|
Class<? extends VPageHTML> |
loginPageClass()
The class of login page for this authenticator.
|
void |
logOut()
Ensures that the user is logged out.
|
VPageHTML |
newLoginPage(PageParameters _pP)
Constructs a login page that redirects to a newly constructed, bookmarkable,
return page if authentication succeeds.
|
void |
onCreated(Session s) |
void |
setCookiePrefix(String cP)
Sets prefix used by the pollwiki for cookie names.
|
extractReturnClass
public WikiAuthenticator(VOWicket _app)
WikiAuthenticator.FailureMessage authenticateEmail(IDPair wikiUser, CookieHandler cookieRelayer) throws VotorolaException
If the user is a pipe, then the implied address (2) is instead effectively taken from the pipe minder's username; while the authenticated address (1) remains that of the pipe user. The comparison is therefore the same as when calling this method to authenticate the pipe minder as herself. But here she is instead authenticated as the pipe. We know it is she because (1) the pipe's email address is privately set to her address, and she has answered the resulting mail challenge. We further require that (2) the minder property of the pipe page be publicly set to her username, so everyone knows who can login as the minder.
wikiUser
- who is persistently logged into the wiki via cookies.cookieRelayer
- a cookie handler that 'gets' its cookies from the
incoming client request.VotorolaException
public String getCookiePrefix()
public void setCookiePrefix(String cP)
getCookiePrefix()
public Class<? extends VPageHTML> loginPageClass()
Authenticator
loginPageClass
in class Authenticator
public void logOut()
Authenticator
logOut
in class Authenticator
public VPageHTML newLoginPage(PageParameters _pP)
Authenticator
newLoginPage
in class Authenticator
_pP
- The type and parameters of the return page to construct after the
login attempt. Parameter "returnClass" specifies the page type, while the
remainder of pP is passed to the page instance.public void onCreated(Session s)
onCreated
in interface ISessionListener