[go: nahoru, domu]

blob: 3af2751445b5f1b207eaca2a1cd598da6e49d3eb [file] [log] [blame]
cbentzel@chromium.org79cb5c12011-09-12 13:12:041// Copyright (c) 2011 The Chromium Authors. All rights reserved.
erg@google.com9349cfb2010-08-31 18:00:532// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "net/base/auth.h"
6
7namespace net {
8
9AuthChallengeInfo::AuthChallengeInfo() : is_proxy(false) {
10}
11
Emily Starkf2c9bbd2019-04-09 17:08:5812AuthChallengeInfo::AuthChallengeInfo(const AuthChallengeInfo& other) = default;
13
Emily Stark08f6c972019-05-28 17:24:2714bool AuthChallengeInfo::MatchesExceptPath(
15 const AuthChallengeInfo& other) const {
16 return (is_proxy == other.is_proxy && challenger == other.challenger &&
17 scheme == other.scheme && realm == other.realm &&
18 challenge == other.challenge);
erg@google.com9349cfb2010-08-31 18:00:5319}
20
Chris Watkins68b15032017-12-01 03:07:1321AuthChallengeInfo::~AuthChallengeInfo() = default;
erg@google.com9349cfb2010-08-31 18:00:5322
Chris Watkins68b15032017-12-01 03:07:1323AuthCredentials::AuthCredentials() = default;
cbentzel@chromium.orgc2911d72011-10-03 22:16:3624
Jan Wilken Dörrie739ccc212021-03-11 18:13:0525AuthCredentials::AuthCredentials(const std::u16string& username,
26 const std::u16string& password)
27 : username_(username), password_(password) {}
cbentzel@chromium.orgf3cf9802011-10-28 18:44:5828
Chris Watkins68b15032017-12-01 03:07:1329AuthCredentials::~AuthCredentials() = default;
cbentzel@chromium.orgc2911d72011-10-03 22:16:3630
Jan Wilken Dörrie739ccc212021-03-11 18:13:0531void AuthCredentials::Set(const std::u16string& username,
32 const std::u16string& password) {
cbentzel@chromium.orgf3cf9802011-10-28 18:44:5833 username_ = username;
34 password_ = password;
35}
36
37bool AuthCredentials::Equals(const AuthCredentials& other) const {
38 return username_ == other.username_ && password_ == other.password_;
39}
40
41bool AuthCredentials::Empty() const {
42 return username_.empty() && password_.empty();
43}
44
erg@google.com9349cfb2010-08-31 18:00:5345} // namespace net