libnick 2025.9.1
A cross-platform base for native Nickvision applications.
Loading...
Searching...
No Matches
credentials.h
Go to the documentation of this file.
1
22
23#ifndef CREDENTIALS_H
24#define CREDENTIALS_H
25
26#include <optional>
27#include <string>
28#include "keyring/credential.h"
29
31{
38 std::optional<Keyring::Credential> get(const std::string& name) noexcept;
45 std::optional<Keyring::Credential> create(const std::string& name) noexcept;
55 bool add(const Keyring::Credential& credential) noexcept;
65 bool update(const Keyring::Credential& credential) noexcept;
72 bool remove(const std::string& name) noexcept;
73}
74
75#endif //SYSTEMCREDENTIALS_H
A model of a credential stored in a keyring.
Definition credential.h:34
Definition credentials.h:31
std::optional< Keyring::Credential > create(const std::string &name) noexcept
Creates a new credential with a random password and adds it to the system's credential manager.
bool add(const Keyring::Credential &credential) noexcept
Adds a new credential object to the system's credential manager.
std::optional< Keyring::Credential > get(const std::string &name) noexcept
Gets a credential from the system's credential manager.
bool update(const Keyring::Credential &credential) noexcept
Updates a credential object in the system's credential manager.
bool remove(const std::string &name) noexcept
Removes a credential object from the system's credential manager.