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

 1 karl  1.8 //%2004////////////////////////////////////////////////////////////////////////
 2 mike  1.2 //
 3 karl  1.8 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
 4           // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
 5           // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
 6 karl  1.7 // IBM Corp.; EMC Corporation, The Open Group.
 7 karl  1.8 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
 8           // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
 9 mike  1.2 //
10 kumpf 1.5 // Permission is hereby granted, free of charge, to any person obtaining a copy
11           // of this software and associated documentation files (the "Software"), to
12           // deal in the Software without restriction, including without limitation the
13           // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
14           // sell copies of the Software, and to permit persons to whom the Software is
15           // furnished to do so, subject to the following conditions:
16           // 
17           // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
18           // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
19           // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
20           // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
21           // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
22           // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
23           // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
24           // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 mike  1.2 //
26           //==============================================================================
27           //
28           // Author: Nag Boranna, Hewlett-Packard Company(nagaraja_boranna@hp.com)
29           //
30           // Modified By:
31           //
32           //%/////////////////////////////////////////////////////////////////////////////
33           
34           #ifndef Pegasus_BasicAuthenticationHandler_h
35           #define Pegasus_BasicAuthenticationHandler_h
36           
37           #include <Pegasus/Common/Config.h>
38           #include <Pegasus/Common/String.h>
39 kumpf 1.4 
40 mike  1.2 #include "Authenticator.h"
41 kumpf 1.4 #include "BasicAuthenticator.h"
42 chuck 1.6 
43           #include <Pegasus/Security/Authentication/Linkage.h>
44 mike  1.2 
45 kumpf 1.4 
46 mike  1.2 PEGASUS_NAMESPACE_BEGIN
47           
48           /** 
49               Implements the AuthenticationHandler for Basic authentication
50           */
51           
52           class PEGASUS_SECURITY_LINKAGE BasicAuthenticationHandler : public Authenticator
53           {
54           public:
55           
56               /** Constructors  */
57               BasicAuthenticationHandler();
58           
59               /** Destructor  */
60               ~BasicAuthenticationHandler();
61               
62 kumpf 1.4     /** Verify the authentication of the user passed in the authorization header.
63                   @param authHeader String containing the Authorization header
64                   @param authInfo Reference to AuthenticationInfo object
65                   @return true on successful authentication, false otherwise
66 mike  1.2     */
67 kumpf 1.3     Boolean authenticate(
68                   const String& authHeader, 
69                   AuthenticationInfo* authInfo);
70 mike  1.2     
71 kumpf 1.4     /** Construct and return the Basic authentication challenge header
72                   @param authType An optional string containing the HTTP authentication type 
73                   @param userName An optional string containing the user name 
74                   (Parameters are not used to generate the Basic authentication challenge 
75                    header, hence they are optional) 
76                   @return A string containing the authentication challenge header.
77 kumpf 1.3     */
78               String getAuthResponseHeader(
79 kumpf 1.4         const String& authType = String::EMPTY,
80                   const String& userName = String::EMPTY,
81                   AuthenticationInfo* authInfo = 0);
82 mike  1.2 
83           private:
84           
85 kumpf 1.4     BasicAuthenticator* _basicAuthenticator;
86 mike  1.2 };
87           
88           PEGASUS_NAMESPACE_END
89           
90           #endif /* Pegasus_BasicAuthenticationHandler_h*/

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2