Results 1 to 9 of 9

Thread: server validations on login page

  1. #1

    Default server validations on login page

    I went through a earlier thread on this topic which said that form validations can be used but in that case the AuthenticationProcessingFilter will have to be junked. But wont that mean that the entire acegi framework is sidelined.
    I want to use a SimpleFormController for doing the validations etc, in the onsubmit of the controller I want to redirect to say j_acegi_security_check or some url which can do the authentication and all that just like it happens normally.
    How do I go about this?
    Rather, instead of roundabout ways for doing this, isnt this a vital part of the framework missing??

  2. #2
    Join Date
    Mar 2005
    Location
    montreal, Canada
    Posts
    52

    Default

    What kind of validation do you want to do ?
    Because acegi offers you the complete set of authentication validations on your userDetails :
    - is user existing ?
    - is username/password pair correct ?
    - is user enabled ?

    etc

    and provides you with a rich set of Authentication event triggerd for each case.

  3. #3

    Default

    i want validations for things like is this a valid username (email format etc).

  4. #4
    Join Date
    Aug 2005
    Location
    Bologna, Italy
    Posts
    79

    Default

    Are sql injection attacks possible?

  5. #5

    Default

    well i guess so, but that is not my immediate concern. I am looking at how to integrate my authentication filters with the validation framework provided by the simpleformcontroller.

  6. #6
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    You'd don't need to use Spring's Validator interface with AuthenticationProcessingFilter. Handling SQL Injection is a concern of your AuthenticationDao (and, more generally, whatever underlaying persistence engine you are running).
    Ben Alex
    Project Founder, Spring UAA, Spring Roo and Spring Security

  7. #7

    Default

    actually what I want to do is take care of simple checks that I need for the username/password fields when the form is posted to /j_acegi_security_check.

  8. #8
    Join Date
    Aug 2005
    Location
    Bologna, Italy
    Posts
    79

    Default

    Perhaps you could reimplement a XXXXXXXProcessingFilter and do your validation programmaticly before doing authentication? Ben doesn't encourage that way.

  9. #9
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    As long as you populate SecurityContextHolder in some reliable fashion, I don't mind how you do it. But at a conceptual level I cannot see the reason you'd need a Validator for two properties (username and password).
    Ben Alex
    Project Founder, Spring UAA, Spring Roo and Spring Security

Similar Threads

  1. Pageable data list with Hibernate
    By robmorgan in forum Data
    Replies: 23
    Last Post: Jul 24th, 2006, 06:12 PM
  2. Replies: 6
    Last Post: Sep 29th, 2005, 04:25 AM
  3. Replies: 0
    Last Post: Aug 30th, 2005, 08:01 AM
  4. Replies: 1
    Last Post: Mar 22nd, 2005, 07:34 AM
  5. Unable to login to Sun Server admin console
    By kut727 in forum Security
    Replies: 4
    Last Post: Mar 13th, 2005, 04:27 PM

Posting Permissions

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