linkahead/authentication.h

Configuration and setup of the client authentication.

Author

Timm Fitschen

Date

2021-06-28

namespace linkahead
namespace authentication
class Authenticator
#include <authentication.h>

Abstract base class for authenticators.

Subclassed by linkahead::authentication::PlainPasswordAuthenticator

Public Functions

virtual ~Authenticator() = default
virtual auto GetCallCredentials() const -> std::shared_ptr<grpc::CallCredentials> = 0
class MetadataCredentialsPluginImpl : public MetadataCredentialsPlugin
#include <authentication.h>

Implementation of a MetadataCredentialsPlugin which my be created by any implementation of the Authenticator class. Only intended for internal use.

Public Functions

MetadataCredentialsPluginImpl(std::string key, std::string value)
auto GetMetadata(string_ref service_url, string_ref method_name, const AuthContext &channel_auth_context, std::multimap<grpc::string, grpc::string> *metadata) -> Status override

Private Members

std::string key
std::string value
class PlainPasswordAuthenticator : public linkahead::authentication::Authenticator

Public Functions

PlainPasswordAuthenticator(const std::string &username, const std::string &password)
virtual auto GetCallCredentials() const -> std::shared_ptr<grpc::CallCredentials> override

Private Members

std::string basic