Arc::UsernameToken Class Reference

Interface for manipulation of WS-Security according to Username Token Profile. More...

#include <UsernameToken.h>

Public Types

enum  PasswordType

Public Member Functions

 UsernameToken (SOAPEnvelope &soap)
 UsernameToken (SOAPEnvelope &soap, const std::string &username, const std::string &password, const std::string &uid, PasswordType pwdtype)
 UsernameToken (SOAPEnvelope &soap, const std::string &username, const std::string &id, bool mac, int iteration)
 operator bool (void)
std::string Username (void)
bool Authenticate (const std::string &password, std::string &derived_key)
bool Authenticate (std::istream &password, std::string &derived_key)

Detailed Description

Interface for manipulation of WS-Security according to Username Token Profile.


Member Enumeration Documentation

SOAP header element


Constructor & Destructor Documentation

Arc::UsernameToken::UsernameToken ( SOAPEnvelope &  soap  ) 

Link to existing SOAP header and parse Username Token information. Username Token related information is extracted from SOAP header and stored in class variables.

Arc::UsernameToken::UsernameToken ( SOAPEnvelope &  soap,
const std::string &  username,
const std::string &  password,
const std::string &  uid,
PasswordType  pwdtype 
)

Add Username Token information into the SOAP header. Generated token contains elements Username and Password and is meant to be used for authentication.

Parameters:
soap the SOAP message
username <wsse:Username>...</wsse:Username> - if empty it is entered interactively from stdin
password <wsse:Password Type="...">...</wsse:Password> - if empty it is entered interactively from stdin
uid <wsse:UsernameToken wsu:ID="...">
pwdtype <wsse:Password Type="...">...</wsse:Password>
Arc::UsernameToken::UsernameToken ( SOAPEnvelope &  soap,
const std::string &  username,
const std::string &  id,
bool  mac,
int  iteration 
)

Add Username Token information into the SOAP header. Generated token contains elements Username and Salt and is meant to be used for deriving Key Derivation.

Parameters:
soap the SOAP message
username <wsse:Username>...</wsse:Username>
mac if derived key is meant to be used for Message Authentication Code
iteration <wsse11:Iteration>...</wsse11:Iteration>

Member Function Documentation

bool Arc::UsernameToken::Authenticate ( std::istream &  password,
std::string &  derived_key 
)

Checks parsed token against password stored in specified stream. If token is meant to be used for deriving a key then key is returned in derived_key

bool Arc::UsernameToken::Authenticate ( const std::string &  password,
std::string &  derived_key 
)

Checks parsed/generated token against specified password. If token is meant to be used for deriving a key then key is returned in derived_key. In that case authentication is performed outside of UsernameToken class using obtained derived_key.

Arc::UsernameToken::operator bool ( void   ) 

Returns true of constructor succeeded

std::string Arc::UsernameToken::Username ( void   ) 

Returns username associated with this instance


The documentation for this class was generated from the following file:
Generated on Wed Jun 27 11:54:26 2012 for Hosting Environment (Daemon) by  doxygen 1.6.3