(file) Return to LocalAuthenticationHandler.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Security / Authentication

Diff for /pegasus/src/Pegasus/Security/Authentication/LocalAuthenticationHandler.cpp between version 1.1.2.2 and 1.4

version 1.1.2.2, 2001/11/20 22:21:45 version 1.4, 2002/02/23 00:27:20
Line 30 
Line 30 
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
 #include <Pegasus/Common/Logger.h> #include <Pegasus/Common/Logger.h>
   #include <Pegasus/Common/Tracer.h>
 #include <Pegasus/Security/Authentication/SecureLocalAuthenticator.h> #include <Pegasus/Security/Authentication/SecureLocalAuthenticator.h>
 #include "LocalAuthenticationHandler.h" #include "LocalAuthenticationHandler.h"
  
Line 40 
Line 41 
  
 LocalAuthenticationHandler::LocalAuthenticationHandler() LocalAuthenticationHandler::LocalAuthenticationHandler()
 { {
       const char METHOD_NAME[] =
           "LocalAuthenticationHandler::LocalAuthenticationHandler()";
   
       PEG_FUNC_ENTER(TRC_AUTHENTICATION, METHOD_NAME);
   
     // ATTN: Load the local authentication module here     // ATTN: Load the local authentication module here
  
     _localAuthenticator = (LocalAuthenticator*) new SecureLocalAuthenticator();     _localAuthenticator = (LocalAuthenticator*) new SecureLocalAuthenticator();
   
       PEG_FUNC_EXIT(TRC_AUTHENTICATION, METHOD_NAME);
 } }
  
 LocalAuthenticationHandler::~LocalAuthenticationHandler() LocalAuthenticationHandler::~LocalAuthenticationHandler()
 { {
       const char METHOD_NAME[] =
           "LocalAuthenticationHandler::~LocalAuthenticationHandler()";
   
       PEG_FUNC_ENTER(TRC_AUTHENTICATION, METHOD_NAME);
   
       PEG_FUNC_EXIT(TRC_AUTHENTICATION, METHOD_NAME);
   
     delete _localAuthenticator;     delete _localAuthenticator;
 } }
  
 Boolean LocalAuthenticationHandler::authenticate( Boolean LocalAuthenticationHandler::authenticate(
     String authHeader,      const String& authHeader,
     AuthenticationInfo* authInfo)     AuthenticationInfo* authInfo)
 { {
       const char METHOD_NAME[] =
           "LocalAuthenticationHandler::authenticate()";
   
       PEG_FUNC_ENTER(TRC_AUTHENTICATION, METHOD_NAME);
   
     Boolean authenticated   = false;     Boolean authenticated   = false;
  
     // Look for ':' seperator     // Look for ':' seperator
Line 61 
Line 81 
  
     if ( colon1 == PEG_NOT_FOUND )     if ( colon1 == PEG_NOT_FOUND )
     {     {
           PEG_FUNC_EXIT(TRC_AUTHENTICATION, METHOD_NAME);
         return ( authenticated );         return ( authenticated );
     }     }
  
Line 69 
Line 90 
     // Look for another ':' seperator     // Look for another ':' seperator
     Uint32 colon2 = authHeader.find(colon1 + 1, ':');     Uint32 colon2 = authHeader.find(colon1 + 1, ':');
  
     if ( colon1 == PEG_NOT_FOUND )      String filePath;
   
       String secretReceived;
   
       if ( colon2 == PEG_NOT_FOUND )
     {     {
         return ( authenticated );          filePath = String::EMPTY;
     }  
  
     String filePath = authHeader.subString( colon1 + 1, (colon2 - colon1 - 1) );          secretReceived = authHeader.subString( colon1 + 1 );
       }
       else
       {
           filePath = authHeader.subString( colon1 + 1, (colon2 - colon1 - 1) );
  
     String secretReceived = authHeader.subString( colon2 + 1 );          secretReceived = authHeader.subString( colon2 + 1 );
       }
  
     authenticated = _localAuthenticator->authenticate(filePath,     authenticated = _localAuthenticator->authenticate(filePath,
         secretReceived, authInfo->getAuthChallenge());         secretReceived, authInfo->getAuthChallenge());
Line 86 
Line 115 
         authInfo->setAuthenticatedUser(userName);         authInfo->setAuthenticatedUser(userName);
     }     }
  
       PEG_FUNC_EXIT(TRC_AUTHENTICATION, METHOD_NAME);
   
     return ( authenticated );     return ( authenticated );
 } }
  
 String LocalAuthenticationHandler::getAuthResponseHeader( String LocalAuthenticationHandler::getAuthResponseHeader(
     String userName,      const String& authHeader,
       AuthenticationInfo* authInfo)
   {
       const char METHOD_NAME[] =
           "LocalAuthenticationHandler::getAuthResponseHeader()";
   
       PEG_FUNC_ENTER(TRC_AUTHENTICATION, METHOD_NAME);
   
       PEG_FUNC_EXIT(TRC_AUTHENTICATION, METHOD_NAME);
   
       //
       // No Implementation required in LocalAuthenticationHandler
       //
       return(String(""));
   }
   
   String LocalAuthenticationHandler::getAuthResponseHeader(
       const String& authType,
       const String& userName,
     AuthenticationInfo* authInfo)     AuthenticationInfo* authInfo)
 { {
       const char METHOD_NAME[] =
           "LocalAuthenticationHandler::getAuthResponseHeader()";
   
       PEG_FUNC_ENTER(TRC_AUTHENTICATION, METHOD_NAME);
   
     String challenge;     String challenge;
  
     String authResp = _localAuthenticator->getAuthResponseHeader(userName, challenge);      String authResp =
           _localAuthenticator->getAuthResponseHeader(authType, userName, challenge);
  
     authInfo->setAuthChallenge(challenge);     authInfo->setAuthChallenge(challenge);
  
       PEG_FUNC_EXIT(TRC_AUTHENTICATION, METHOD_NAME);
   
     return(authResp);     return(authResp);
 } }
  


Legend:
Removed from v.1.1.2.2  
changed lines
  Added in v.1.4

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2