Digital Authentication Framework 6.0.1.33
Public Member Functions

DAAuthState Class Reference

Long term state for authglue library. More...

#include <daf_auth_state.h>

List of all members.

Public Member Functions

 DAAuthState ()
 ctor with empty object.
 DAAuthState (const DAAuthState &other)
 ctor with (deep) copy of another state object.
void operator= (const DAAuthState &other)
 assignment by deep copy.
 ~DAAuthState ()
 dtor, freeing underlying message.
std::string marshal () const
 Produce a string format of underlying JSON message.
bool unmarshal (const std::string &str)
 Replace object by unmarshaling provided string, returning false if that string has invalid JSON encoding.
bool getAuthClass (DAAuthClass &cls)
 Get the stored authentication class, returning false if there is no valid stored class.
void setAuthClass (DAAuthClass cls)
 Save the authentication class.
void setKeySerial (const std::string &ks)
 Save the given key serial number.
bool hasKeySerial ()
 Return true if we have a saved key serial number.
bool getKeySerial (std::string &ks_out)
 Retrieve saved key serial number, returning false if there is no valid stored key serial number.
void setUserString (const std::string &us)
 Save (opaque) data as the user string.
bool getUserString (std::string &us_out)
 Retrieve data stored by above call.
void setDAMessage (const DAMessage &msg)
 Save the contents of the given DAMessage (all fields).
bool getDAMessage (DAMessage &msg)
 Retrieve saved DAMessage contents into msg, returning false if there is not one, or if it is invalid.

Detailed Description

Long term state for authglue library.

This class is used internally by the authglue library. The DAF implementation's startup data is embedded in the data stored by the authglue layer. Note that, although we distinguish between "no data was stored" and "an empty length string was stored", the layers above us, in general, do not.


Constructor & Destructor Documentation

DAAuthState::DAAuthState ( )

ctor with empty object.

DAAuthState::DAAuthState ( const DAAuthState other)

ctor with (deep) copy of another state object.

DAAuthState::~DAAuthState ( )

dtor, freeing underlying message.


Member Function Documentation

bool DAAuthState::getAuthClass ( DAAuthClass cls)

Get the stored authentication class, returning false if there is no valid stored class.

bool DAAuthState::getDAMessage ( DAMessage msg)

Retrieve saved DAMessage contents into msg, returning false if there is not one, or if it is invalid.

bool DAAuthState::getKeySerial ( std::string &  ks_out)

Retrieve saved key serial number, returning false if there is no valid stored key serial number.

bool DAAuthState::hasKeySerial ( )

Return true if we have a saved key serial number.

std::string DAAuthState::marshal ( ) const

Produce a string format of underlying JSON message.

void DAAuthState::operator= ( const DAAuthState other)

assignment by deep copy.

void DAAuthState::setAuthClass ( DAAuthClass  cls)

Save the authentication class.

void DAAuthState::setDAMessage ( const DAMessage msg)

Save the contents of the given DAMessage (all fields).

void DAAuthState::setKeySerial ( const std::string &  ks)

Save the given key serial number.

bool DAAuthState::unmarshal ( const std::string &  str)

Replace object by unmarshaling provided string, returning false if that string has invalid JSON encoding.


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