Poco::RemotingNG::TCP

class CredentialsStore

File Information

Library: RemotingNG/TCP
Package: TCP
Header: Poco/RemotingNG/TCP/CredentialsStore.h

Description

This class holds authentication tokens and their associated credentials.

Inheritance

Direct Base Classes: Poco::RefCountedObject

All Base Classes: Poco::RefCountedObject

Member Summary

Member Functions: addCredentials, generateAuthToken, getCredentials

Inherited Functions: duplicate, referenceCount, release

Types Aliases

CredentialsMap

using CredentialsMap = std::map < Poco::UInt64, Credentials >;

Ptr

using Ptr = Poco::AutoPtr < CredentialsStore >;

Constructors

CredentialsStore

CredentialsStore();

Creates a CredentialsStore.

Destructor

~CredentialsStore virtual

~CredentialsStore();

Destroys the CredentialsStore.

Member Functions

addCredentials

Poco::UInt64 addCredentials(
    const Credentials & creds
);

Adds the credentials and return a new authentication token representing them.

getCredentials

const Credentials & getCredentials(
    Poco::UInt64 authToken
) const;

Returns the Credentials identified by the given authentication token.

Throws a Poco::NotFoundException if no Credentials are associated with the given authentication token.

generateAuthToken protected

Poco::UInt64 generateAuthToken();