E-MailRelay

Static Public Member Functions | List of all members
GAuth::Secrets Class Reference

Provides factory functions for client and server secrets objects. More...

`#include <gsecrets.h>`

## Static Public Member Functions
static void | check (const std::string &client, const std::string &server, const std::string &pop)
| Checks the given secret sources. More...
static std::unique_ptr< SaslServerSecrets > | newServerSecrets (const std::string &spec, const std::string &log_name)
| Factory function for server secrets. More...
static std::unique_ptr< SaslClientSecrets > | newClientSecrets (const std::string &spec, const std::string &log_name)
| Factory function for client secrets. More...

## Detailed Description

Provides factory functions for client and server secrets objects.

The implementation is based on GAuth::SecretsFile.

Definition at line 46 of file gsecrets.h.

## Member Function Documentation

## ◆ check()

void GAuth::Secrets::check | ( | const std::string & | client,
|  | const std::string & | server,
|  | const std::string & | pop
| ) |  |
| static

Checks the given secret sources.

Logs warnings and throws an exception if there are any fatal errors.

Definition at line 64 of file gsecrets.cpp.

## ◆ newClientSecrets()

std::unique_ptr< GAuth::SaslClientSecrets > GAuth::Secrets::newClientSecrets | ( | const std::string & | spec,
|  | const std::string & | log_name
| ) |  |
| static

Factory function for client secrets.

The spec is empty or a secrets file path or "plain:<base64-user-id>:<base64-pwd>". The 'log-name' is used in log and error messages. Returns an in-valid() object if the spec is empty. Throws on error.

Definition at line 78 of file gsecrets.cpp.

## ◆ newServerSecrets()

std::unique_ptr< GAuth::SaslServerSecrets > GAuth::Secrets::newServerSecrets | ( | const std::string & | spec,
|  | const std::string & | log_name
| ) |  |
| static

Factory function for server secrets.

The spec is empty or a secrets file path or "/pam" or "pam:". The 'log-name' is used in log and error messages. Returns an in-valid() object if the spec is empty. Throws on error.

Definition at line 72 of file gsecrets.cpp.

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

- /tmp/slackdce/slackrepo.HKsbdz/build_emailrelay/emailrelay-2.6/src/gauth/gsecrets.h
- /tmp/slackdce/slackrepo.HKsbdz/build_emailrelay/emailrelay-2.6/src/gauth/gsecrets.cpp