List, in reply to the acegi sample, message was rejected to the list
(possibly due to the attachment with the sample)
Hereby the reply without the sample.
Any ideas how to share the sample ?
Hi David & James,
I had the same issue, tried to get an idea on how to use acegi with
wicket.
Based on the samples , I made my own test that uses acegi for
authentication and swarm for the authorization. (http://wicketstuff.org/confluence/display/STUFFWIKI/Swarm+and+Acegi+HowTo
)
The sources are attached, containing a POM file (mvn jetty:run gives
you a working sample)
Please note that these are my test source, just to understand how
these things work.
If you are intrested in a real world example, take a look at
joiningtracks sources (repo is found here). At this moment, this web
app uses acegi without swarm for authentication, we are working on
an update that uses acegi + swarm without the test token providers
as found in the samples.
At this moment the samples (and my test) handles the authentication
based on wicket pages, creating the authentication token in code. We
changed that in our codebase, acegi handles full authentication,
creates the proper token based on the security.xml (that is part of
the spring application context).
Maybe this is helpful.
Kind Regards,
Olger
On 5 mei 2008, at 17:49, David Nedrow wrote:
Using bits of the examples provided in wicket-security, I have the
following method define in AcegiLoginContext...
private AbstractAuthenticationToken token;
public AcegiLoginContext(AbstractAuthenticationToken token) {
this.token = token;
}
Again, following the examples, I call the previous method from my
login page as follows....
LoginContext ctx = AcegiLoginContext(new
TestingAuthenticationToken(username, password,
getAuthorities(username,
password)));
However, the compiler (and NetBeans) complains that
AcegiLoginContext(TestingAuthenticationToken, ...) isn't a valid
method. NetBeans suggests creating the method. But given that these
are drawn from the (presumably) working examples, what is the
issue? TestingAuthenticationToken extends
AbstractAuthenticationToken, so shouldn't it be acceptable as input
to AcegiLoginContext(AbstractAuthenticationToken token)? My brain
is so twisted around trying to find the relevant parts of the
example that I must be missing something.
I feel like Dr. Thorndyke from High Anxiety, falling into a
swirling morass of interleaved code. ;)
-David
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]