version 1.12, 2006/01/30 16:18:28
|
version 1.13, 2007/06/29 17:43:15
|
|
|
// | // |
//============================================================================== | //============================================================================== |
// | // |
// Author: Nag Boranna, Hewlett-Packard Company(nagaraja_boranna@hp.com) |
|
// |
|
// Modified By: |
|
// Sushma Fernandes, Hewlett-Packard Company(sushma_fernandes@hp.com) |
|
// |
|
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
#ifndef Pegasus_BasicAuthenticationHandler_h | #ifndef Pegasus_BasicAuthenticationHandler_h |
|
|
*/ | */ |
| |
static const char BASIC_AUTHENTICATION_FAILED_KEY [] = | static const char BASIC_AUTHENTICATION_FAILED_KEY [] = |
"Security.Authentication.BasicAuthenticationHandler.BASIC_AUTHENTICATION_FAILED"; |
"Security.Authentication.BasicAuthenticationHandler." |
|
"BASIC_AUTHENTICATION_FAILED"; |
| |
static const char BASIC_AUTHENTICATION_FAILED [] = | static const char BASIC_AUTHENTICATION_FAILED [] = |
"Authentication failed for user=$0."; | "Authentication failed for user=$0."; |
| |
class PEGASUS_SECURITY_LINKAGE BasicAuthenticationHandler : public Authenticator |
class PEGASUS_SECURITY_LINKAGE BasicAuthenticationHandler |
|
: public Authenticator |
{ | { |
public: | public: |
| |
|
|
/** Destructor */ | /** Destructor */ |
~BasicAuthenticationHandler(); | ~BasicAuthenticationHandler(); |
| |
/** Verify the authentication of the user passed in the authorization header. |
/** Verify the authentication of the user passed in the authorization |
|
header. |
@param authHeader String containing the Authorization header | @param authHeader String containing the Authorization header |
@param authInfo Reference to AuthenticationInfo object | @param authInfo Reference to AuthenticationInfo object |
@return true on successful authentication, false otherwise | @return true on successful authentication, false otherwise |
|
|
AuthenticationInfo* authInfo); | AuthenticationInfo* authInfo); |
| |
/** Construct and return the Basic authentication challenge header | /** Construct and return the Basic authentication challenge header |
@param authType An optional string containing the HTTP authentication type |
@param authType An optional string containing the HTTP authentication |
|
type |
@param userName An optional string containing the user name | @param userName An optional string containing the user name |
(Parameters are not used to generate the Basic authentication challenge | (Parameters are not used to generate the Basic authentication challenge |
header, hence they are optional) | header, hence they are optional) |