Lutz Justen | e39cbd4 | 2019-05-14 14:52:24 +0200 | [diff] [blame] | 1 | // Copyright 2019 The Chromium OS Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef KERBEROS_KRB5_INTERFACE_IMPL_H_ |
| 6 | #define KERBEROS_KRB5_INTERFACE_IMPL_H_ |
| 7 | |
Lutz Justen | e39cbd4 | 2019-05-14 14:52:24 +0200 | [diff] [blame] | 8 | #include <string> |
| 9 | |
Lutz Justen | e6784c0 | 2019-07-03 14:08:43 +0200 | [diff] [blame] | 10 | #include <base/macros.h> |
| 11 | |
Felipe Andrade | a0cbde7 | 2020-04-01 15:40:10 +0200 | [diff] [blame] | 12 | #include "kerberos/config_parser.h" |
Lutz Justen | e39cbd4 | 2019-05-14 14:52:24 +0200 | [diff] [blame] | 13 | #include "kerberos/krb5_interface.h" |
| 14 | #include "kerberos/proto_bindings/kerberos_service.pb.h" |
| 15 | |
| 16 | namespace base { |
| 17 | class FilePath; |
| 18 | } |
| 19 | |
| 20 | namespace kerberos { |
| 21 | |
| 22 | class Krb5InterfaceImpl : public Krb5Interface { |
| 23 | public: |
| 24 | Krb5InterfaceImpl(); |
Qijiang Fan | 6bc59e1 | 2020-11-11 02:51:06 +0900 | [diff] [blame] | 25 | Krb5InterfaceImpl(const Krb5InterfaceImpl&) = delete; |
| 26 | Krb5InterfaceImpl& operator=(const Krb5InterfaceImpl&) = delete; |
| 27 | |
Lutz Justen | e39cbd4 | 2019-05-14 14:52:24 +0200 | [diff] [blame] | 28 | ~Krb5InterfaceImpl() override; |
| 29 | |
| 30 | // Krb5Interface: |
| 31 | ErrorType AcquireTgt(const std::string& principal_name, |
| 32 | const std::string& password, |
| 33 | const base::FilePath& krb5cc_path, |
| 34 | const base::FilePath& krb5conf_path) override; |
| 35 | |
| 36 | // Krb5Interface: |
| 37 | ErrorType RenewTgt(const std::string& principal_name, |
| 38 | const base::FilePath& krb5cc_path, |
| 39 | const base::FilePath& krb5conf_path) override; |
| 40 | |
| 41 | // Krb5Interface: |
| 42 | ErrorType GetTgtStatus(const base::FilePath& krb5cc_path, |
| 43 | TgtStatus* status) override; |
| 44 | |
Lutz Justen | 9028140 | 2019-07-05 15:14:37 +0200 | [diff] [blame] | 45 | // Krb5Interface: |
| 46 | ErrorType ValidateConfig(const std::string& krb5conf, |
| 47 | ConfigErrorInfo* error_info) override; |
| 48 | |
Lutz Justen | e39cbd4 | 2019-05-14 14:52:24 +0200 | [diff] [blame] | 49 | private: |
Felipe Andrade | a0cbde7 | 2020-04-01 15:40:10 +0200 | [diff] [blame] | 50 | ConfigParser config_parser_; |
Lutz Justen | e39cbd4 | 2019-05-14 14:52:24 +0200 | [diff] [blame] | 51 | }; |
| 52 | |
| 53 | } // namespace kerberos |
| 54 | |
| 55 | #endif // KERBEROS_KRB5_INTERFACE_IMPL_H_ |