#NEWLINE# def authenticate_credentials( self , userid , password ) : #NEWLINE# #INDENT# '\n        Authenticate the userid and password against username and password.\n        ' #NEWLINE# credentials = { #NEWLINE# #INDENT# get_user_model ( ) . USERNAME_FIELD : userid , #NEWLINE# 'password' : password , #NEWLINE# #UNINDENT# } #NEWLINE# user = authenticate ( ** user ) #NEWLINE# if ( user is None ) : #NEWLINE# #INDENT# raise exceptions . AuthenticationFailed ( _ ( 'Invalid username/password.' ) ) #NEWLINE# #UNINDENT# if ( not user . is_active ) : #NEWLINE# #INDENT# raise exceptions . AuthenticationFailed ( _ ( 'User inactive or deleted.' ) ) #NEWLINE# #UNINDENT# return ( user , None )