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) |
Interface for manipulation of WS-Security according to Username Token Profile.
SOAP header element
| 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.
| 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.
| 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> |
| 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
1.6.3