Changeset 898


Ignore:
Timestamp:
Sep 24, 2010, 11:16:26 AM (6 years ago)
Author:
keesvb
Message:

update authentication service for REST services to also accept SHA256 hashed passwords

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/services/dbnp/user/AuthService.groovy

    r831 r898  
    3636                        currentUser.login( token );
    3737                } catch ( Exception e ) {
    38                         return false //username wasn't in the system, show them an error message?
     38                        def foundUser = User.findByUsernameAndPasswordHash(username, password)
     39                        if (foundUser) {
     40                                return foundUser
     41                        }
     42                        else {
     43                                return false //username wasn't in the system, show them an error message?
     44                        }
    3945                }
    4046
Note: See TracChangeset for help on using the changeset viewer.