libnick 2024.9.2
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 (const std::string &name, const std::string &uri, const std::string &username, const std::string &password)
 Constructs a credential.
 
const std::string & getName () const
 Gets the name of the credential.
 
void setName (const std::string &name)
 Sets the name of the credential.
 
const std::string & getUri () const
 Gets the uri of the credential (can also be used as a comment for the Credential)
 
void setUri (const std::string &uri)
 Sets the uri of the credential (can also be used as a comment for the Credential)
 
const std::string & getUsername () const
 Gets the username of the credential.
 
void setUsername (const std::string &username)
 Sets the username of the credential.
 
const std::string & getPassword () const
 Gets the password of the credential.
 
void setPassword (const std::string &password)
 Sets the password of the credential.
 
bool operator< (const Credential &compare) const
 Compares Credential objects via < operator.
 
bool operator> (const Credential &compare) const
 Compares Credential objects via > operator.
 
bool operator== (const Credential &compare) const
 Compares Credential objects via == operator.
 
bool operator!= (const Credential &compare) const
 Compares Credential objects via != operator.
 

Friends

std::ostream & operator<< (std::ostream &os, const Credential &credential)
 Outputs the Credential object.
 

Detailed Description

A model of a credential stored in a keyring.

Constructor & Destructor Documentation

◆ Credential()

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

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

Gets the name of the credential.

Returns
The name of the credential

◆ getPassword()

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

Gets the password of the credential.

Returns
The password of the credential

◆ getUri()

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

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

Gets the username of the credential.

Returns
The username of the credential

◆ operator!=()

bool Nickvision::Keyring::Credential::operator!= ( const Credential & compare) const

Compares Credential objects via != operator.

Parameters
compareThe Credential object to compare too
Returns
True if this != compare

◆ operator<()

bool Nickvision::Keyring::Credential::operator< ( const Credential & compare) const

Compares Credential objects via < operator.

Parameters
compareThe Credential object to compare too
Returns
True if this < compare

◆ operator==()

bool Nickvision::Keyring::Credential::operator== ( const Credential & compare) const

Compares Credential objects via == operator.

Parameters
compareThe Credential object to compare too
Returns
True if this == compare

◆ operator>()

bool Nickvision::Keyring::Credential::operator> ( const Credential & compare) const

Compares Credential objects via > operator.

Parameters
compareThe Credential object to compare too
Returns
True if this > compare

◆ setName()

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

Sets the name of the credential.

Parameters
nameThe name of the credential

◆ setPassword()

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

Sets the password of the credential.

Parameters
passwordThe password of the credential

◆ setUri()

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

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)

Sets the username of the credential.

Parameters
usernameThe username of the credential

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & os,
const Credential & credential )
friend

Outputs the Credential object.


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