1 #ifndef SOTA_CLIENT_TOOLS_SERVER_CREDENTIALS_H_
2 #define SOTA_CLIENT_TOOLS_SERVER_CREDENTIALS_H_
6 #include <boost/filesystem.hpp>
8 enum class AuthMethod { kNone = 0, kBasic, kOauth2, kTls };
17 explicit BadCredentialsJson(
const std::string &what_arg) : std::runtime_error(what_arg.c_str()) {}
28 bool CanSignOffline()
const;
29 AuthMethod GetMethod()
const {
return method_; };
30 std::string GetClientP12()
const {
return client_p12_; };
31 std::string GetRepoUrl()
const {
return repo_url_; };
32 std::string GetAuthUser()
const {
return auth_user_; };
33 std::string GetAuthPassword()
const {
return auth_password_; };
34 std::string GetAuthServer()
const {
return auth_server_; };
35 std::string GetOSTreeServer()
const {
return ostree_server_; };
36 std::string GetClientId()
const {
return client_id_; };
37 std::string GetClientSecret()
const {
return client_secret_; };
38 std::string GetScope()
const {
return scope_; };
44 boost::filesystem::path
GetPathOnDisk()
const {
return credentials_path_; }
48 std::string client_p12_;
49 std::string repo_url_;
50 std::string auth_user_;
51 std::string auth_password_;
52 std::string auth_server_;
53 std::string ostree_server_;
54 std::string client_id_;
55 std::string client_secret_;
57 boost::filesystem::path credentials_path_;
60 #endif // SOTA_CLIENT_TOOLS_SERVER_CREDENTIALS_H_