You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Cagatay Civici <ca...@gmail.com> on 2006/01/19 12:57:53 UTC

JSF Components For Acegi Security Framework

Hi,

I've implemented custom jsf components that can be used to integrate Acegi
into JSF. Acegi has built-in JSP tags for securing components but no support
for JSF, my aim is to do the same thing for the JSF environment.

Related information can be found at my blog;
http://www.jroller.com/page/cagataycivici?entry=acegi_jsf_components_hit_the

I've released the component in sourceforge jsf-comp. The component is under
Apache License.
http://sourceforge.net/projects/jsf-comp/

If you are planning to use JSF-Spring-Acegi together in your applications,
this component could be a possible solution.

Regards,

Cagatay Civici

Re: JSF Components For Acegi Security Framework

Posted by Cagatay Civici <ca...@gmail.com>.
Hi,

A login component is not included for now, during testing I've used regular
j_acegi_security_check url. When I was thinking about a login component,
I've decided not to implement because it has a gui and I must add strong
customization features like styles, labels, layout and etc, even if I do, I
doubt that will satisfy user's requirements in the end.

Also logging with Acegi using a JSF action is not so hard, I came across to
this example;

public String doLoginButtonAction() {
   String result = null;
   Authentication authReq =
*new*UsernamePasswordAuthenticationToken(userName, password);
   Authentication auth = *null*;
    *try* {
        auth = authenticationManager.authenticate(authReq);
    } *catch* (AuthenticationException e) {
          //...
    }
*     if* (auth != *null*) {
        result = "success";
    } *else* {
        result = "failure";
    }
}

Regards,

Cagatay Civici,


On 1/19/06, Enrique Medina <e....@gmail.com> wrote:
>
> Hi Richard,
>
> That's what I meant in my previous email. Now I use a JSF page, doing some
> hooks to be able to call my bean and also login with Acegi, so I was
> wondering how did they solved it...
>
> 2006/1/19, Richard Wallace <rw...@thewallacepack.net>:
> >
> > Very cool!
> >
> > What about a component for handling user logins?  Or do you use a
> > regular jsp/html page for submitting a form to the
> > j_acegi_security_check url (or whatever your filter processing url might
> > be)?
> >
> > Cagatay Civici wrote:
> > > Hi,
> > >
> > > I've implemented custom jsf components that can be used to integrate
> > > Acegi into JSF. Acegi has built-in JSP tags for securing components
> > > but no support for JSF, my aim is to do the same thing for the JSF
> > > environment.
> > >
> > > Related information can be found at my blog;
> > > http://www.jroller.com/page/cagataycivici?entry=acegi_jsf_components_hit_the
> >
> > >
> > >
> > > I've released the component in sourceforge jsf-comp. The component is
> > > under Apache License.
> > > http://sourceforge.net/projects/jsf-comp/
> > >
> > > If you are planning to use JSF-Spring-Acegi together in your
> > > applications, this component could be a possible solution.
> > >
> > > Regards,
> > >
> > > Cagatay Civici
> >
> >
>

Re: JSF Components For Acegi Security Framework

Posted by Enrique Medina <e....@gmail.com>.
Hi Richard,

That's what I meant in my previous email. Now I use a JSF page, doing some
hooks to be able to call my bean and also login with Acegi, so I was
wondering how did they solved it...

2006/1/19, Richard Wallace <rw...@thewallacepack.net>:
>
> Very cool!
>
> What about a component for handling user logins?  Or do you use a
> regular jsp/html page for submitting a form to the
> j_acegi_security_check url (or whatever your filter processing url might
> be)?
>
> Cagatay Civici wrote:
> > Hi,
> >
> > I've implemented custom jsf components that can be used to integrate
> > Acegi into JSF. Acegi has built-in JSP tags for securing components
> > but no support for JSF, my aim is to do the same thing for the JSF
> > environment.
> >
> > Related information can be found at my blog;
> >
> http://www.jroller.com/page/cagataycivici?entry=acegi_jsf_components_hit_the
> >
> >
> > I've released the component in sourceforge jsf-comp. The component is
> > under Apache License.
> > http://sourceforge.net/projects/jsf-comp/
> >
> > If you are planning to use JSF-Spring-Acegi together in your
> > applications, this component could be a possible solution.
> >
> > Regards,
> >
> > Cagatay Civici
>
>

Re: JSF Components For Acegi Security Framework

Posted by Richard Wallace <rw...@thewallacepack.net>.
Very cool!

What about a component for handling user logins?  Or do you use a 
regular jsp/html page for submitting a form to the 
j_acegi_security_check url (or whatever your filter processing url might 
be)?

Cagatay Civici wrote:
> Hi,
>
> I've implemented custom jsf components that can be used to integrate 
> Acegi into JSF. Acegi has built-in JSP tags for securing components 
> but no support for JSF, my aim is to do the same thing for the JSF 
> environment.
>
> Related information can be found at my blog;
> http://www.jroller.com/page/cagataycivici?entry=acegi_jsf_components_hit_the 
>
>
> I've released the component in sourceforge jsf-comp. The component is 
> under Apache License.
> http://sourceforge.net/projects/jsf-comp/
>
> If you are planning to use JSF-Spring-Acegi together in your 
> applications, this component could be a possible solution.
>
> Regards,
>
> Cagatay Civici


Re: JSF Components For Acegi Security Framework

Posted by Cagatay Civici <ca...@gmail.com>.
Hi,

I did not inject anything from Acegi actually, Acegi wraps
httpservletrequest using a filter. So the component does not know whether it
uses acegi or not. I have used httpservletrequest methods like isuserinrole.

Secondly, I am not very familiar with the myfaces's userroleaware, so I
cannot say something for now.

Regards,

Cagatay Civici,



On 1/19/06, Aleksei Valikov <va...@gmx.net> wrote:
>
> Hi.
>
> > I've implemented custom jsf components that can be used to integrate
> > Acegi into JSF. Acegi has built-in JSP tags for securing components but
> > no support for JSF, my aim is to do the same thing for the JSF
> environment.
> >
> > Related information can be found at my blog;
> >
> http://www.jroller.com/page/cagataycivici?entry=acegi_jsf_components_hit_the
> >
> >
> > I've released the component in sourceforge jsf-comp. The component is
> > under Apache License.
> > http://sourceforge.net/projects/jsf-comp/
> >
> > If you are planning to use JSF-Spring-Acegi together in your
> > applications, this component could be a possible solution.
>
> Doesn't it intersect with MyFaces' UserRoleAware? I haven't used it
> myself, but as long as you integrate ACEGI context in the HTTP request,
> this should work for all UserRoleAware components.
>
> Bye.
> /lexi
>

Re: JSF Components For Acegi Security Framework

Posted by Aleksei Valikov <va...@gmx.net>.
Hi.

> I've implemented custom jsf components that can be used to integrate 
> Acegi into JSF. Acegi has built-in JSP tags for securing components but 
> no support for JSF, my aim is to do the same thing for the JSF environment.
> 
> Related information can be found at my blog;
> http://www.jroller.com/page/cagataycivici?entry=acegi_jsf_components_hit_the 
> 
> 
> I've released the component in sourceforge jsf-comp. The component is 
> under Apache License.
> http://sourceforge.net/projects/jsf-comp/
> 
> If you are planning to use JSF-Spring-Acegi together in your 
> applications, this component could be a possible solution.

Doesn't it intersect with MyFaces' UserRoleAware? I haven't used it 
myself, but as long as you integrate ACEGI context in the HTTP request, 
this should work for all UserRoleAware components.

Bye.
/lexi

Re: JSF Components For Acegi Security Framework

Posted by Enrique Medina <e....@gmail.com>.
Hi,

First of all, I really like that logo from Barça in your page ;-)

Second, how did you manage to inject the Acegi framework into JSF at the
first login page?

2006/1/19, Cagatay Civici <ca...@gmail.com>:
>
> Hi,
>
> I've implemented custom jsf components that can be used to integrate Acegi
> into JSF. Acegi has built-in JSP tags for securing components but no support
> for JSF, my aim is to do the same thing for the JSF environment.
>
> Related information can be found at my blog;
>
> http://www.jroller.com/page/cagataycivici?entry=acegi_jsf_components_hit_the
>
> I've released the component in sourceforge jsf-comp. The component is
> under Apache License.
> http://sourceforge.net/projects/jsf-comp/
>
> If you are planning to use JSF-Spring-Acegi together in your applications,
> this component could be a possible solution.
>
> Regards,
>
> Cagatay Civici
>

Re: JSF Components For Acegi Security Framework

Posted by Cagatay Civici <ca...@gmail.com>.
Hi,

I've not tried the acegi-jsf components with facelets so I cannot say
something for now, there is no sample application but at weekend I am
planning to write a documentation on sourceforge project site.

Secondly, jsp and jsf has different lifecycles, this is the main problem,
they are not aware of each other, if you use jsp to secure jsf components
problems are likely to occur, this would cause problems, so instead of jsp
tags, using pure jsf components like these should be employed.

Regards,

Cagatay Civici,

On 1/20/06, Thomas Gaudin <th...@wanadoo.fr> wrote:
>
> Hi,
>
> I would like to use your component with facelets.
> I tried first to use it with JSP but I could not have it working.
> Would you have a working sample application to show how to integrate it?
>
> I also have question : what is the reason why the JSP tag library can not
> be used with JSF?
> I am new to JSF and I  would appreciate some more info.
>
> Thanks,
>
> Thomas
>
> PS : I post this both in Myfaces list and in your blog so that you can
> answer where you think it is more suitable.
>
> Cagatay Civici a écrit :
>
> Hi,
>
> I've implemented custom jsf components that can be used to integrate Acegi
> into JSF. Acegi has built-in JSP tags for securing components but no support
> for JSF, my aim is to do the same thing for the JSF environment.
>
> Related information can be found at my blog;
>
> http://www.jroller.com/page/cagataycivici?entry=acegi_jsf_components_hit_the
>
> I've released the component in sourceforge jsf-comp. The component is
> under Apache License.
> http://sourceforge.net/projects/jsf-comp/
>
> If you are planning to use JSF-Spring-Acegi together in your applications,
> this component could be a possible solution.
>
> Regards,
>
> Cagatay Civici
>
> ------------------------------
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.375 / Virus Database: 267.14.20/234 - Release Date: 18/01/2006
>
>
>
>
>