You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by David Nedrow <dn...@mac.com> on 2008/05/05 17:49:37 UTC

TestingAuthenticationToken and AbstractAuthenticationToken

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: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: TestingAuthenticationToken and AbstractAuthenticationToken

Posted by Maurice Marrink <ma...@gmail.com>.
Could it be you have a classpath problem, as the above should work.
the examples use acegi 1.0.5 and spring 2.0

Maurice

On Mon, May 5, 2008 at 5:49 PM, David Nedrow <dn...@mac.com> 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: users-unsubscribe@wicket.apache.org
>  For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: TestingAuthenticationToken and AbstractAuthenticationToken

Posted by David Nedrow <dn...@mac.com>.
On May 7, 2008, at 2:55 AM, Maurice Marrink wrote:

> The 1.3.1-SNAPSHOT is not the latest snapshot, i should probably
> delete it from the repo. The latest version is 1.3-SNAPSHOT.


D'oh! Thanks.

-David

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: TestingAuthenticationToken and AbstractAuthenticationToken

Posted by Maurice Marrink <ma...@gmail.com>.
The 1.3.1-SNAPSHOT is not the latest snapshot, i should probably
delete it from the repo. The latest version is 1.3-SNAPSHOT. it was
renamed some time ago to match wicket version naming.

Maurice

On Tue, May 6, 2008 at 10:34 PM, David Nedrow <dn...@mac.com> wrote:
>
>  On May 6, 2008, at 1:17 PM, Maurice Marrink wrote:
>
>
> > SwarmPolicyFileHiveFactory is new in 1.3.1  due to a separation of
> > dependencies. It is equivalent to the old PolicyFileHiveFactory and
> > should be used instead if you are using 1.3.1 code.
> >
>
>
>  Odd. I'm using 1.3.1-SNAPSHOT that I grabbed today (jar files) and there is
> no SwarmPolicyFileHiveFactory class in it.
>
>  Not a big deal if I can just swap in the old PolicyFileHiveFactory.
>
>  Thanks,
>
>
>
>  David
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>  For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: TestingAuthenticationToken and AbstractAuthenticationToken

Posted by David Nedrow <dn...@mac.com>.
On May 6, 2008, at 1:17 PM, Maurice Marrink wrote:

> SwarmPolicyFileHiveFactory is new in 1.3.1  due to a separation of
> dependencies. It is equivalent to the old PolicyFileHiveFactory and
> should be used instead if you are using 1.3.1 code.


Odd. I'm using 1.3.1-SNAPSHOT that I grabbed today (jar files) and  
there is no SwarmPolicyFileHiveFactory class in it.

Not a big deal if I can just swap in the old PolicyFileHiveFactory.

Thanks,

David

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: TestingAuthenticationToken and AbstractAuthenticationToken

Posted by Maurice Marrink <ma...@gmail.com>.
SwarmPolicyFileHiveFactory is new in 1.3.1  due to a separation of
dependencies. It is equivalent to the old PolicyFileHiveFactory and
should be used instead if you are using 1.3.1 code.

Maurice

On Tue, May 6, 2008 at 5:43 PM, David Nedrow <dn...@mac.com> wrote:
> Olger,
>
>
>
>  On May 6, 2008, at 12:59 AM, Olger Warnier wrote:
>
>
> > 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.
> >
>
>
>  Cool, thanks for the clear example. One item of note for me is the use of
> SwarmPolicyFileHiveFactory. So far as I can see, this doesn't exist in swarm
> 1.3 (released), and I didn't see it browsing the 1.3.x source tree.
>
>  Is this a deprecated class, or something I'm overlooking?
>
>
>
>  -David
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>  For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: TestingAuthenticationToken and AbstractAuthenticationToken

Posted by David Nedrow <dn...@mac.com>.
Olger,


On May 6, 2008, at 12:59 AM, Olger Warnier wrote:

> 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.


Cool, thanks for the clear example. One item of note for me is the use  
of SwarmPolicyFileHiveFactory. So far as I can see, this doesn't exist  
in swarm 1.3 (released), and I didn't see it browsing the 1.3.x source  
tree.

Is this a deprecated class, or something I'm overlooking?

-David

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org