blob: c08245080484b4dab8a999c1ec5f0ee48605825a [file] [log] [blame]
Lutz Justene39cbd42019-05-14 14:52:24 +02001// 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 Justene39cbd42019-05-14 14:52:24 +02008#include <string>
9
Lutz Justene6784c02019-07-03 14:08:43 +020010#include <base/macros.h>
11
Felipe Andradea0cbde72020-04-01 15:40:10 +020012#include "kerberos/config_parser.h"
Lutz Justene39cbd42019-05-14 14:52:24 +020013#include "kerberos/krb5_interface.h"
14#include "kerberos/proto_bindings/kerberos_service.pb.h"
15
16namespace base {
17class FilePath;
18}
19
20namespace kerberos {
21
22class Krb5InterfaceImpl : public Krb5Interface {
23 public:
24 Krb5InterfaceImpl();
Qijiang Fan6bc59e12020-11-11 02:51:06 +090025 Krb5InterfaceImpl(const Krb5InterfaceImpl&) = delete;
26 Krb5InterfaceImpl& operator=(const Krb5InterfaceImpl&) = delete;
27
Lutz Justene39cbd42019-05-14 14:52:24 +020028 ~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 Justen90281402019-07-05 15:14:37 +020045 // Krb5Interface:
46 ErrorType ValidateConfig(const std::string& krb5conf,
47 ConfigErrorInfo* error_info) override;
48
Lutz Justene39cbd42019-05-14 14:52:24 +020049 private:
Felipe Andradea0cbde72020-04-01 15:40:10 +020050 ConfigParser config_parser_;
Lutz Justene39cbd42019-05-14 14:52:24 +020051};
52
53} // namespace kerberos
54
55#endif // KERBEROS_KRB5_INTERFACE_IMPL_H_