Results 1 to 3 of 3

Thread: Custom authentication using only username and having multiple default pages

  1. #1
    Join Date
    Nov 2010
    Location
    Athens
    Posts
    12

    Default Custom authentication using only username and having multiple default pages

    Hi all!
    I have to create a custom login form with spring 2.5 where the user will login only with its username-so the login form will have only one field- and after he/she log in wil be directed to different default pages depending on his role.In other words if the user has role doctor will be directed to doctor.htm and if is a dentist will be directed to dentist.htm.All example if found in google and I've read take as granted the username/password login form and I've found nothing about redirection to different pages.Any help would be really apriciated.

  2. #2
    Join Date
    Jan 2008
    Posts
    1,826

    Default

    To be clear, I do not consider only providing a username a form of login as it is not secure. I do not recommend doing this to secure your application. The easiest way would be to write a UserDetailsService that always returns an empty string for the password and then including a hidden input with the password equal to empty string.

    There are a number of threads on the forums related to redirecting based upon role.
    Rob Winch - @rob_winch
    Spring Security Lead
    Pivotal

  3. #3
    Join Date
    Nov 2010
    Location
    Athens
    Posts
    12

    Default

    First of all thank you for your answer.Seconly I know what you mean but the system is indoors and they care more about the redirection part.They need the form only for redirection.And thank you for the resources!

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
  •