(file) Return to AuthenticationInfo.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/AuthenticationInfo.h between version 1.31 and 1.41

version 1.31, 2006/11/10 18:14:57 version 1.41, 2008/12/16 18:55:59
Line 1 
Line 1 
 //%2006////////////////////////////////////////////////////////////////////////  //%LICENSE////////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development  // Licensed to The Open Group (TOG) under one or more contributor license
 // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.  // agreements.  Refer to the OpenPegasusNOTICE.txt file distributed with
 // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;  // this work for additional information regarding copyright ownership.
 // IBM Corp.; EMC Corporation, The Open Group.  // Each contributor licenses this file to you under the OpenPegasus Open
 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;  // Source License; you may not use this file except in compliance with the
 // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.  // License.
 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;  
 // EMC Corporation; VERITAS Software Corporation; The Open Group.  
 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;  
 // EMC Corporation; Symantec Corporation; The Open Group.  
 // //
 // Permission is hereby granted, free of charge, to any person obtaining a copy  // Permission is hereby granted, free of charge, to any person obtaining a
 // of this software and associated documentation files (the "Software"), to  // copy of this software and associated documentation files (the "Software"),
 // deal in the Software without restriction, including without limitation the  // to deal in the Software without restriction, including without limitation
 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or  // the rights to use, copy, modify, merge, publish, distribute, sublicense,
 // sell copies of the Software, and to permit persons to whom the Software is  // and/or sell copies of the Software, and to permit persons to whom the
 // furnished to do so, subject to the following conditions:  // Software is furnished to do so, subject to the following conditions:
 // //
 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN  // The above copyright notice and this permission notice shall be included
 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED  // in all copies or substantial portions of the Software.
 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT  
 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR  
 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT  
 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN  
 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION  
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  
 // //
 //==============================================================================  // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
   // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
   // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
   // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
   // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
   // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
   // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
   //
   //////////////////////////////////////////////////////////////////////////
 // //
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
Line 63 
Line 61 
 { {
 public: public:
  
     /** Constructor - Creates an uninitiated new AuthenticationInfo      /** Constructor - Creates an uninitialized new AuthenticationInfo
         object reprenting a AuthenticationInfo class. The class object          object representing an AuthenticationInfo class. The class object
         created by this constructor can only be used in an operation such as the         created by this constructor can only be used in an operation such as the
         copy constructor.  It cannot be used to do method calls like          copy constructor.  It cannot be used to do method calls such as
         setAuthStatus, getAuthType, etc. since it is unitiated.          getAuthType, since it is uninitialized.
  
         Use one of the other constructors to create an initiated new         Use one of the other constructors to create an initiated new
         AuthenticationInfo class object. Throws an exception         AuthenticationInfo class object. Throws an exception
Line 137 
Line 135 
         PEG_METHOD_EXIT();         PEG_METHOD_EXIT();
     }     }
  
     /** Get the authentication status of the request      /** Sets the connection authentication status of the request to the
         @return the current authentication status          status specified.
     */  
     AuthenticationInfoRep::AuthStatus getAuthStatus() const  
     {  
         _checkRep();  
         return _rep->getAuthStatus();  
     }  
   
     /** Sets the authentication status of the request to the status  
         specified.  
         @param status - the new authentication status         @param status - the new authentication status
     */     */
     void   setAuthStatus(AuthenticationInfoRep::AuthStatus status)      void   setConnectionAuthenticated(Boolean status)
     {     {
         _checkRep();          CheckRep(_rep);
         _rep->setAuthStatus(status);          _rep->setConnectionAuthenticated(status);
     }     }
  
     /** Get the previously authenticated user name     /** Get the previously authenticated user name
Line 161 
Line 150 
     */     */
     String getAuthenticatedUser() const     String getAuthenticatedUser() const
     {     {
         _checkRep();          CheckRep(_rep);
         return _rep->getAuthenticatedUser();         return _rep->getAuthenticatedUser();
     }     }
  
Line 170 
Line 159 
     */     */
     void   setAuthenticatedUser(const String& userName)     void   setAuthenticatedUser(const String& userName)
     {     {
         _checkRep();          CheckRep(_rep);
         _rep->setAuthenticatedUser(userName);         _rep->setAuthenticatedUser(userName);
     }     }
  
   #ifdef PEGASUS_OS_ZOS
   
       /** The connection user is for z/OS only.
           On z/OS Unix Local Domain Sockets and sockets
           protected by AT-TLS are able to get the user ID of
           the connected user.
           This information is needed for later authentication
           steps.
        */
   
       /** Get the connection user name
           @return the connection user name
       */
       String getConnectionUser() const
       {
           CheckRep(_rep);
           return _rep->getConnectionUser();
       }
   
       /** Sets the connection user name
           @param userName - string containing the user name
                              provided by the connection
       */
       void   setConnectionUser(const String& userName)
       {
           CheckRep(_rep);
           _rep->setConnectionUser(userName);
       }
   
   #endif
   
     /** Get the previously authenticated password     /** Get the previously authenticated password
         @return the authenticated password         @return the authenticated password
     */     */
     String getAuthenticatedPassword() const     String getAuthenticatedPassword() const
     {     {
         _checkRep();          CheckRep(_rep);
         return _rep->getAuthenticatedPassword();         return _rep->getAuthenticatedPassword();
     }     }
  
Line 188 
Line 208 
     */     */
     void   setAuthenticatedPassword(const String& password)     void   setAuthenticatedPassword(const String& password)
     {     {
         _checkRep();          CheckRep(_rep);
         _rep->setAuthenticatedPassword(password);         _rep->setAuthenticatedPassword(password);
     }     }
  
     /** Get the authentication challenge that was sent to the client      /** Get the local authentication file path that was sent to client
         @return string containing the authentication challenge          @return string containing the authentication file path
     */     */
     String getAuthChallenge() const      String getLocalAuthFilePath() const
     {     {
         _checkRep();          CheckRep(_rep);
         return _rep->getAuthChallenge();          return _rep->getLocalAuthFilePath();
     }     }
  
     /** Sets the authentication challenge to the specified challenge      /** Set the local authentication file path to the specified file path
         @param challenge - string containing the authentication challenge          @param filePath String containing the authentication file path
     */     */
     void   setAuthChallenge(const String& challenge)      void setLocalAuthFilePath(const String& filePath)
     {     {
         _checkRep();          CheckRep(_rep);
         _rep->setAuthChallenge(challenge);          _rep->setLocalAuthFilePath(filePath);
     }     }
  
     /** Get the authentication secret that was sent to client      /** Get the local authentication secret that was sent to client
         @return string containing the authentication secret         @return string containing the authentication secret
     */     */
     String getAuthSecret() const      String getLocalAuthSecret() const
     {     {
         _checkRep();          CheckRep(_rep);
         return _rep->getAuthSecret();          return _rep->getLocalAuthSecret();
     }     }
  
     /** Set the authentication secret to the specified secret      /** Set the local authentication secret to the specified secret
         @param secret - string containing the authentication secret         @param secret - string containing the authentication secret
     */     */
     void   setAuthSecret(const String& secret)      void   setLocalAuthSecret(const String& secret)
     {  
         _checkRep();  
         _rep->setAuthSecret(secret);  
     }  
   
     /** Returns the connection type of the previous authenticated request  
         @return true if the connection is privileged, false otherwise  
     */  
     Boolean isPrivileged() const  
     {     {
         _checkRep();          CheckRep(_rep);
         return _rep->isPrivileged();          _rep->setLocalAuthSecret(secret);
     }  
   
     /** Set the privileged flag to the specified value  
         @param privileged - boolean flag indicating the connection type  
     */  
     void   setPrivileged(Boolean privileged)  
     {  
         _checkRep();  
         _rep->setPrivileged(privileged);  
     }     }
  
     /** Is the request authenticated     /** Is the request authenticated
Line 251 
Line 253 
     /** Returns the authentication status of the current connection.     /** Returns the authentication status of the current connection.
         @return true if the connection was authenticated, false otherwise         @return true if the connection was authenticated, false otherwise
     */     */
     Boolean isAuthenticated() const      Boolean isConnectionAuthenticated() const
     {     {
         _checkRep();          CheckRep(_rep);
         return _rep->isAuthenticated();          return _rep->isConnectionAuthenticated();
     }     }
  
     /** Set the authentication type to the specified type     /** Set the authentication type to the specified type
Line 262 
Line 264 
     */     */
     void   setAuthType(const String& authType)     void   setAuthType(const String& authType)
     {     {
         _checkRep();          CheckRep(_rep);
         _rep->setAuthType(authType);         _rep->setAuthType(authType);
     }     }
  
Line 271 
Line 273 
     */     */
     String getAuthType() const     String getAuthType() const
     {     {
         _checkRep();          CheckRep(_rep);
         return _rep->getAuthType();         return _rep->getAuthType();
     }     }
  
Line 281 
Line 283 
     */     */
     void setIpAddress(const String& ipAddress)     void setIpAddress(const String& ipAddress)
     {     {
         _checkRep();          CheckRep(_rep);
         _rep->setIpAddress(ipAddress);         _rep->setIpAddress(ipAddress);
     }     }
  
Line 295 
Line 297 
     */     */
     String getIpAddress() const     String getIpAddress() const
     {     {
         _checkRep();          CheckRep(_rep);
         return _rep->getIpAddress();         return _rep->getIpAddress();
     }     }
  
Line 306 
Line 308 
     */     */
     CIMKerberosSecurityAssociation* getSecurityAssociation() const     CIMKerberosSecurityAssociation* getSecurityAssociation() const
     {     {
         _checkRep();          CheckRep(_rep);
         return _rep->getSecurityAssociation();         return _rep->getSecurityAssociation();
     }     }
  
Line 316 
Line 318 
     */     */
     void setSecurityAssociation()     void setSecurityAssociation()
     {     {
         _checkRep();          CheckRep(_rep);
         _rep->setSecurityAssociation();         _rep->setSecurityAssociation();
     }     }
 #endif #endif
  
     Array<SSLCertificateInfo*> getClientCertificateChain()     Array<SSLCertificateInfo*> getClientCertificateChain()
     {     {
         _checkRep();          CheckRep(_rep);
         return _rep->getClientCertificateChain();         return _rep->getClientCertificateChain();
     }     }
  
     void setClientCertificateChain(Array<SSLCertificateInfo*> clientCertificate)     void setClientCertificateChain(Array<SSLCertificateInfo*> clientCertificate)
     {     {
         _checkRep();          CheckRep(_rep);
         _rep->setClientCertificateChain(clientCertificate);         _rep->setClientCertificateChain(clientCertificate);
     }     }
  
Line 338 
Line 340 
     */     */
     void setRemotePrivilegedUserAccessChecked()     void setRemotePrivilegedUserAccessChecked()
     {     {
         _checkRep();          CheckRep(_rep);
         _rep->setRemotePrivilegedUserAccessChecked();         _rep->setRemotePrivilegedUserAccessChecked();
     }     }
  
Line 348 
Line 350 
     */     */
     Boolean getRemotePrivilegedUserAccessChecked()     Boolean getRemotePrivilegedUserAccessChecked()
     {     {
         _checkRep();          CheckRep(_rep);
         return _rep->getRemotePrivilegedUserAccessChecked();         return _rep->getRemotePrivilegedUserAccessChecked();
     }     }
  
Line 359 
Line 361 
  
     }     }
  
     void _checkRep() const  
     {  
         if (!_rep)  
             throw UninitializedObjectException();  
     }  
   
     AuthenticationInfoRep* _rep;     AuthenticationInfoRep* _rep;
 }; };
  


Legend:
Removed from v.1.31  
changed lines
  Added in v.1.41

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2