libnick 2025.9.1
A cross-platform base for native Nickvision applications.
Loading...
Searching...
No Matches
Nickvision::Keyring::Credential Class Reference

A model of a credential stored in a keyring. More...

#include <credential.h>

Public Member Functions

 Credential ()=default
 Constructs a credential.
 
 Credential (const std::string &name, const std::string &uri, const std::string &username, const std::string &password) noexcept
 Constructs a credential.
 
const std::string & getName () const noexcept
 Gets the name of the credential.
 
void setName (const std::string &name) noexcept
 Sets the name of the credential.
 
const std::string & getUri () const noexcept
 Gets the uri of the credential (can also be used as a comment for the Credential)
 
void setUri (const std::string &uri) noexcept
 Sets the uri of the credential (can also be used as a comment for the Credential)
 
const std::string & getUsername () const noexcept
 Gets the username of the credential.
 
void setUsername (const std::string &username) noexcept
 Sets the username of the credential.
 
const std::string & getPassword () const noexcept
 Gets the password of the credential.
 
void setPassword (const std::string &password) noexcept
 Sets the password of the credential.
 
std::strong_ordering operator<=> (const Credential &) const noexcept=default
 Compares Credential objects via spaceship operator.
 

Detailed Description

A model of a credential stored in a keyring.

Constructor & Destructor Documentation

◆ Credential() [1/2]

Nickvision::Keyring::Credential::Credential ( )
default

Constructs a credential.

◆ Credential() [2/2]

Nickvision::Keyring::Credential::Credential ( const std::string & name,
const std::string & uri,
const std::string & username,
const std::string & password )
noexcept

Constructs a credential.

Parameters
nameThe name of the credential
uriThe uri of the credential
usernameThe username of the credential
passwordThe password of the credential

Member Function Documentation

◆ getName()

const std::string & Nickvision::Keyring::Credential::getName ( ) const
noexcept

Gets the name of the credential.

Returns
The name of the credential

◆ getPassword()

const std::string & Nickvision::Keyring::Credential::getPassword ( ) const
noexcept

Gets the password of the credential.

Returns
The password of the credential

◆ getUri()

const std::string & Nickvision::Keyring::Credential::getUri ( ) const
noexcept

Gets the uri of the credential (can also be used as a comment for the Credential)

Returns
The uri of the credential

◆ getUsername()

const std::string & Nickvision::Keyring::Credential::getUsername ( ) const
noexcept

Gets the username of the credential.

Returns
The username of the credential

◆ operator<=>()

std::strong_ordering Nickvision::Keyring::Credential::operator<=> ( const Credential & ) const
defaultnoexcept

Compares Credential objects via spaceship operator.

Parameters
compareThe Credential object to compare too
Returns
A strong_ordering value representing the comparison

◆ setName()

void Nickvision::Keyring::Credential::setName ( const std::string & name)
noexcept

Sets the name of the credential.

Parameters
nameThe name of the credential

◆ setPassword()

void Nickvision::Keyring::Credential::setPassword ( const std::string & password)
noexcept

Sets the password of the credential.

Parameters
passwordThe password of the credential

◆ setUri()

void Nickvision::Keyring::Credential::setUri ( const std::string & uri)
noexcept

Sets the uri of the credential (can also be used as a comment for the Credential)

Parameters
uriThe uri of the credential

◆ setUsername()

void Nickvision::Keyring::Credential::setUsername ( const std::string & username)
noexcept

Sets the username of the credential.

Parameters
usernameThe username of the credential

The documentation for this class was generated from the following file: