Results 1 to 9 of 9

Thread: Spring Security + JSF + FACELETS

  1. #1
    Join Date
    Aug 2008
    Posts
    1

    Smile Spring Security + JSF + FACELETS

    Hi

    our web-stack heavily uses JSF + Facelets combination. We have successfully integrated our Authentication as SpringSecurity ( 2.x) and in the process of integrating Authorization also.

    But i felt & got to know that Spring-Security <authorize> tags doesn't have JSF + Facelets supported implementation. can you give me some pointers how can i proceed.

    is there any documentation or materials to work spring-security roles based authorization with JSF & facelets combination.


    thanks
    ek

  2. #2
    Join Date
    Oct 2008
    Location
    On your screen
    Posts
    50

    Unhappy Help!

    I'm also interested in a way to proceed about this... I'm using Facelets + Trinidad... Any help would be highly appreciated...

    By the way, the acegijsf taglib didn't work for me either...

  3. #3
    Join Date
    Mar 2008
    Posts
    24

    Default

    Me too,

    I go mad trying to read out the logged in user. I really have to be able to determine the user for my application under JSF. I as well use Spring/JSF/Trinidad. Maybe the username can be read out through other ways? I've seen something on the internet, but I din't understand it.

    As usual, every help is appreciated.

    Best regards

  4. #4
    Join Date
    Mar 2005
    Posts
    13

    Default

    Has anyone found an alternative to the <security:authorize tag for JSF / webflow / spring security? I have been trying to find a way to hide buttons if the user does not have a specified role.

  5. #5
    Join Date
    Oct 2008
    Location
    On your screen
    Posts
    50

    Default

    Quote Originally Posted by hypersound View Post
    Me too,

    I go mad trying to read out the logged in user. I really have to be able to determine the user for my application under JSF. I as well use Spring/JSF/Trinidad. Maybe the username can be read out through other ways? I've seen something on the internet, but I din't understand it.

    As usual, every help is appreciated.

    Best regards
    Hey Hypersound, if you need to read the logged in user you can implement the authentication through a session managed bean (you can work it around based on this example: hxxp://ocpsoft.com/java/acegi-spring-security-jsf-login-page/ (Sorry, you have to copy/paste the link as I'm too new to post links in this site, hehehe). It shouldn't be too hard to adapt it to your needs, you just need to add the user properties and work it from there (unless I misunderstood your post)... I used this solution for a while until I decided to use Web Flow in my project, but that's a whole different story...

  6. #6
    Join Date
    Apr 2006
    Posts
    7

    Default

    There's an app in the spring web flow download called swf-booking-faces which has helped me.

    I'm using this for the login | logout bit in my header.

    Code:
    <c:if test="${not empty sessionScope.SPRING_SECURITY_LAST_USERNAME}"">
    	            	Welcome, ${sessionScope.SPRING_SECURITY_LAST_USERNAME}" | <a href="${request.contextPath}/spring/logout">Logout</a>
    				</c:if>
    				<c:if test="${empty sessionScope.SPRING_SECURITY_LAST_USERNAME}"}">
    	            	<a href="${request.contextPath}/spring/login">Login</a>
    				</c:if>

  7. #7
    Join Date
    Mar 2008
    Posts
    17

    Default Combining Spring-Security with Facelets + Maven

    Hi,

    I've created a simple jar file to easily integrate Spring Security and Facelets. You can even add it as maven dependency.

    If you are interested in this, take a look at
    Using Spring Security with Facelets

    Greetings,
    Dominik

  8. #8
    Join Date
    Feb 2007
    Location
    England
    Posts
    71

    Default Spring Security + JSF + FACELETS

    Dominik,

    Can't seem to get hold of the source any other locations?

    looks good

    Cheers
    Paul

  9. #9
    Join Date
    Mar 2008
    Posts
    17

    Default

    I've fixed the problem.

    sorry, my fault.

    greetz,
    dominik

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •