Changeset 898

Show
Ignore:
Timestamp:
24-09-10 11:16:26 (4 years ago)
Author:
keesvb
Message:

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

Files:
1 modified

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