1 martin 1.13 //%LICENSE////////////////////////////////////////////////////////////////
|
2 martin 1.14 //
|
3 martin 1.13 // Licensed to The Open Group (TOG) under one or more contributor license
4 // agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
5 // this work for additional information regarding copyright ownership.
6 // Each contributor licenses this file to you under the OpenPegasus Open
7 // Source License; you may not use this file except in compliance with the
8 // License.
|
9 martin 1.14 //
|
10 martin 1.13 // Permission is hereby granted, free of charge, to any person obtaining a
11 // copy of this software and associated documentation files (the "Software"),
12 // to deal in the Software without restriction, including without limitation
13 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
14 // and/or sell copies of the Software, and to permit persons to whom the
15 // Software is furnished to do so, subject to the following conditions:
|
16 martin 1.14 //
|
17 martin 1.13 // The above copyright notice and this permission notice shall be included
18 // in all copies or substantial portions of the Software.
|
19 martin 1.14 //
|
20 martin 1.13 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
21 martin 1.14 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
22 martin 1.13 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23 // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
24 // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26 // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
27 martin 1.14 //
|
28 martin 1.13 //////////////////////////////////////////////////////////////////////////
|
29 kumpf 1.1 //
30 //%/////////////////////////////////////////////////////////////////////////////
31
32 #ifndef Pegasus_SecureBasicAuthenticator_h
33 #define Pegasus_SecureBasicAuthenticator_h
34
35 #include <Pegasus/Security/UserManager/UserManager.h>
36
37 #include "BasicAuthenticator.h"
38
|
39 chuck 1.3 #include <Pegasus/Security/Authentication/Linkage.h>
|
40 kumpf 1.1
41 PEGASUS_NAMESPACE_BEGIN
42
43 /** This class provides Secure basic authentication implementation by extending
44 the BasicAuthenticator.
45 */
|
46 kumpf 1.9 class PEGASUS_SECURITY_LINKAGE SecureBasicAuthenticator
47 : public BasicAuthenticator
|
48 kumpf 1.1 {
49 public:
50
|
51 kumpf 1.9 /** constructor. */
|
52 kumpf 1.1 SecureBasicAuthenticator();
53
|
54 kumpf 1.9 /** destructor. */
|
55 kumpf 1.1 ~SecureBasicAuthenticator();
56
57 /** Verify the authentication of the requesting user.
58 @param userName String containing the user name
59 @param password String containing the user password
|
60 karl 1.14.8.1 @param authInfo AuthenticationInfo holding ALL request specific
61 authentication information
|
62 kumpf 1.1 @return true on successful authentication, false otherwise
63 */
64 Boolean authenticate(
|
65 kumpf 1.9 const String& userName,
|
66 karl 1.14.8.1 const String& password,
67 AuthenticationInfo* authInfo);
|
68 kumpf 1.1
|
69 sushma.fernandes 1.7 /**
70 Verify whether the user is valid.
71 @param userName String containing the user name
|
72 karl 1.14.8.1 @param authInfo reference to AuthenticationInfo object that holds the
73 authentication information for the given connection.
|
74 sushma.fernandes 1.7 @return true on successful validation, false otherwise
75 */
|
76 karl 1.14.8.1 Boolean validateUser(
77 const String& userName,
78 AuthenticationInfo* authInfo);
|
79 sushma.fernandes 1.7
|
80 kumpf 1.1 /** Construct and return the HTTP Basic authentication challenge header
81 @return A string containing the authentication challenge header.
82 */
83 String getAuthResponseHeader();
84
85 private:
86
|
87 thilo.boehm 1.12 #ifdef PEGASUS_OS_ZOS
88 #if (__TARGET_LIB__ >= 0x410A0000)
89
90 String _zosAPPLID;
91
92 #elif defined(PEGASUS_PLATFORM_ZOS_ZSERIES_IBM)
93
94 /** Set the applicatoin ID to CFZAPPL for validatition of passtickes.
95 This function is only needed if the compile target system is z/OS R9
96 or earlier and 32 Bit !
97 @return true on success.
98 */
99 Boolean set_ZOS_ApplicationID( void );
100 #endif // end __TARGET_LIB__
101 #endif // end PEGASUS_OS_ZOS
102
|
103 kumpf 1.1 String _realm;
104 UserManager* _userManager;
105 };
106
107 PEGASUS_NAMESPACE_END
108
109 #endif /* Pegasus_SecureBasicAuthenticator_h */
|