blob: 9e2469ab5be1eeceff980a4aec9c15cc3fb3a902 [file] [log] [blame]
// 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_parser.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:
ConfigParser config_parser_;
DISALLOW_COPY_AND_ASSIGN(Krb5InterfaceImpl);
};
} // namespace kerberos
#endif // KERBEROS_KRB5_INTERFACE_IMPL_H_