I have this:
@Override
public boolean authenticate(String username, String password) {
Person person = new Person();
person.setAlias(username);
person.setPassword(password);
return dBDao.authorizePerson(person);
}
public boolean isAuthorized() {
return authorized;
}
public void setAuthorized(boolean authorized) {
this.authorized = authorized;
if (authorized) {
getPerson().setLoggedIn(true);
}
// Call below too!
signIn(getPerson().getAlias(), getPerson().getPassword());
}
@Override
protected Class<? extends WebPage> getSignInPageClass() {
return LoginPage.class;
}
Which means that I use a custom page for loggin in, and sort of can
login how I want to...
Ravi_116 wrote:
Nino - Thanks for the reply
The AuthenticatedWebSession has the isSignedIn() method defined "final". So
cannot extend and override it.
/**
* @return True if the user is signed in to this session
*/
public final boolean isSignedIn()
{
return signedIn;
}
Ravi
Nino.Martinez wrote:
Ravi_116 wrote:
What is best way to integrate NTLM with Wicket authentication module ?
Currently, we are migrating from Standard Login page implementation to a
JCIF's NTLM (Windows domain credentials).
JCIF's provides a convenient servlet filter to do the NTLM handshake. It
sticks the username in the HttpServlet.getRemoteUser(). The current
implementation of the wicket is to extend AuthenticatedWebSession and
provide a MyAppWebSession authenticate method and a login page.
@Override
protected Class<? extends WebPage> getSignInPageClass()
{
return LoginPage.class;
}
@Override
protected Class<? extends AuthenticatedWebSession> getWebSessionClass()
{
return MyAppWebSession.class;
}
public class MyAppWebSession extends AuthenticatedWebSession
{
public boolean authenticate(String userName, String password)
{
// This is not the NTLM authentication, i need to get the username
provided
by NTLM here
myAuthenticator.authenticate(username)
}
}
How does wicket determine to show a login-page in the Wicket Application
?
Seems like it's not using getHttpServletRequest().getRemoteUser()
It's just using the information you provide above... So it should be a
clean plug, you should just forward username and password in your above
code... that's what I do using my own authenticator.
I think it sets a simple property if youre signed in or not based on the
above authenticate..
There seems to be a couple of ways to tackle this issue :
1. Use wicket's IAuthorizationStratergy and plugin NtlmAuthenticator
(from
JCIF's) into this and add the additional authentication to it.
2. Use Swarm authentication framework.
3. Propagate the username from getHttpServletRequest().getRemoteUser() to
MyAppWebSession class and not show login page if JCIF's filter
authenticates
the user using NTLM.
Any pointers/ideas are appreciated,
Ravi
--
-Wicket for love
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
-Wicket for love
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]