Add key_file.
This commit is contained in:
1 parent
4f60efa87a
commit
5ef2e0b929
7 files changed
+75
-52
No files matched your search
@@ -1,4 +1,4 @@
|
||||
// Copyright 2021 James Pace
|
||||
// Copyright 2021-2022 James Pace
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@@ -24,7 +24,7 @@
|
||||
class Authorizer
|
||||
{
|
||||
public:
|
||||
Authorizer(const std::string& pub_key, const std::string& issuer, const std::string& aclFilePath);
|
||||
Authorizer(const std::string& keyFilePath, const std::string& aclFilePath);
|
||||
static std::optional<std::string> read_key(const std::string& key_file);
|
||||
void add_unknown(const std::string& username);
|
||||
bool is_unknown(const std::string& username);
|
||||
@@ -38,6 +38,7 @@ private:
|
||||
AuthList _unknownList;
|
||||
|
||||
YAML::Node _aclFile;
|
||||
YAML::Node _keyFile;
|
||||
|
||||
std::string _pub_key;
|
||||
std::string _issuer;
|
||||
|
||||
@@ -22,7 +22,6 @@ std::optional<std::string> read_key(const std::string & key_file);
|
||||
std::tuple<bool, std::chrono::time_point<std::chrono::system_clock>> validate(
|
||||
const std::string & token,
|
||||
const std::string & username,
|
||||
const std::string & issuer,
|
||||
const std::string & pub_key);
|
||||
|
||||
std::string gen_token(
|
||||
|
||||
Reference in new issue
Block a user