public function attempt(array $credentials) {
    $user = $this->users->retrieveByCredentials($credentials);

    if($user instanceof UserInterface && $this->users->validateCredentials($user, $credentials)) {
       return $this->create($user);
    }

    return false;
  }
public function attempt(array $credentials) {
    $user = $this->users->retrieveByCredentials($credentials);

    if($user instanceof UserInterface && $this->users->validateCredentials($user, $credentials)) {
       return $this->create($user);
    }

    return false;
  }
public function attempt ( array $ credentials ) { $ user = $ this -> users -> retrieveByCredentials ( $ credentials ) ; if ( $ user instanceof UserInterface && $ this -> users -> validateCredentials ( $ user , $ credentials ) ) { return $ this -> create ( $ user ) ; } return false ; }
Attempt to create an AuthToken from user credentials.

@param array $credentials
@return bool|AuthToken
Attempt to create an AuthToken from user credentials .