 
   _encodePassword =
     scrypt: (password) ->
-      Q.nfcall(scrypt.passwordHash, password, config.scrypt.maxtime)
+      Q.ninvoke(scrypt, 'passwordHash', password, config.scrypt.maxtime)
 
   _encodePasswordPromise = (password) ->
     if Q.isPromiseAlike api.AuthImpl.encodePassword
       api.AuthImpl.encodePassword password
     else
-      Q.nfcall api.AuthImpl.encodePassword, password
+      Q.ninvoke api.AuthImpl, 'encodePassword', password
 
   encodePassword = (password, callback) ->
     if api.AuthImpl and api.AuthImpl.encodePassword

    if Q.isPromiseAlike api.AuthImpl.signUp
      api.AuthImpl.signUp userData, uuid
    else
      Q.nfcall api.AuthImpl.signUp, userData, uuid

  signUp = (userData, passwordField, needVerify, callback) ->
    deferred = Q.defer()

    if Q.isPromiseAlike api.AuthImpl.findUser
      api.AuthImpl.findUser login
    else
      Q.ninvoke api.AuthImpl, 'findUser', login

  _jwtPayloadPromise = (user) ->
    if Q.isPromiseAlike api.AuthImpl.jwtPayload
      api.AuthImpl.jwtPayload user
    else
      Q.ninvoke api.AuthImpl, 'jwtPayload', user

  signIn = (login, password, callback) ->
    deferred = Q.defer()
