| // Copyright 2019 The Chromium OS Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| #ifndef KERBEROS_KRB5_INTERFACE_IMPL_H_ |
| #define KERBEROS_KRB5_INTERFACE_IMPL_H_ |
| |
| #include <string> |
| |
| #include <base/macros.h> |
| |
| #include "kerberos/config_validator.h" |
| #include "kerberos/krb5_interface.h" |
| #include "kerberos/proto_bindings/kerberos_service.pb.h" |
| |
| namespace base { |
| class FilePath; |
| } |
| |
| namespace kerberos { |
| |
| class Krb5InterfaceImpl : public Krb5Interface { |
| public: |
| Krb5InterfaceImpl(); |
| ~Krb5InterfaceImpl() override; |
| |
| // Krb5Interface: |
| ErrorType AcquireTgt(const std::string& principal_name, |
| const std::string& password, |
| const base::FilePath& krb5cc_path, |
| const base::FilePath& krb5conf_path) override; |
| |
| // Krb5Interface: |
| ErrorType RenewTgt(const std::string& principal_name, |
| const base::FilePath& krb5cc_path, |
| const base::FilePath& krb5conf_path) override; |
| |
| // Krb5Interface: |
| ErrorType GetTgtStatus(const base::FilePath& krb5cc_path, |
| TgtStatus* status) override; |
| |
| // Krb5Interface: |
| ErrorType ValidateConfig(const std::string& krb5conf, |
| ConfigErrorInfo* error_info) override; |
| |
| private: |
| ConfigValidator config_validator_; |
| |
| DISALLOW_COPY_AND_ASSIGN(Krb5InterfaceImpl); |
| }; |
| |
| } // namespace kerberos |
| |
| #endif // KERBEROS_KRB5_INTERFACE_IMPL_H_ |