summaryrefslogtreecommitdiffstats
path: root/remoting/host/user_authenticator_fake.cc
blob: 61b19f7302860f35dd9f54f322f7051b3f50c826 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "remoting/host/user_authenticator_fake.h"

#include <string>

namespace remoting {

UserAuthenticatorFake::UserAuthenticatorFake() {}
UserAuthenticatorFake::~UserAuthenticatorFake() {}

bool UserAuthenticatorFake::Authenticate(const std::string& username,
                                         const std::string& password) {
  return (username.compare(fail_username()) ||
      password.compare(fail_password()));
}

const char* UserAuthenticatorFake::fail_username() {
  return "userfail";
}

const char* UserAuthenticatorFake::fail_password() {
  return "passwordfail";
}

}  // namespace remoting