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

 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 mike   1.2  //
30             //%/////////////////////////////////////////////////////////////////////////////
31             
32             #ifndef Pegasus_LocalAuthFile_h
33             #define Pegasus_LocalAuthFile_h
34             
35             #include <Pegasus/Common/Config.h>
36 kumpf  1.3  #include <Pegasus/Common/String.h>
37             
38 chuck  1.6  #include <Pegasus/Security/Authentication/Linkage.h>
39 mike   1.2  
40             PEGASUS_NAMESPACE_BEGIN
41             
42             
43 kumpf  1.15 /** This class provides the required functions to create, write and delete to a
44 kumpf  1.3      file on the file system.
45 mike   1.2  */
46             
47             class PEGASUS_SECURITY_LINKAGE LocalAuthFile
48             {
49             public:
50             
51                 /** Constructor. */
52 kumpf  1.3      LocalAuthFile(const String& userName);
53 mike   1.2  
54 kumpf  1.15 
55 mike   1.2      /** Destructor. */
56                 ~LocalAuthFile();
57             
58 kumpf  1.3      /** Creates a file and writes random token in to it.
59 kumpf  1.15         @return a string containing the full path name of the file created if
60                     the file creation was successfull, null otherwise.
61 mike   1.2      */
62                 String create();
63 kumpf  1.15 
64 kumpf  1.3      /** Removes the file created.
65                     @return   true on successful removal of the file, false otherwise.
66 mike   1.2      */
67                 Boolean remove();
68             
69 sushma.fernandes 1.12     /** Get the string that was created as a secret string
70 mike             1.2      */
71 sushma.fernandes 1.12     String getSecretString();
72 mike             1.2  
73                       private:
74                       
75 kumpf            1.3  
76                           String  _generateRandomTokenString();
77 mike             1.2  
78 kumpf            1.3      String  _userName;
79 mike             1.2  
80 kumpf            1.3      String  _filePathName;
81 mike             1.2  
82 kumpf            1.4      String  _authFilePath;
83                       
84 sushma.fernandes 1.12     String  _secret;
85 mike             1.2  };
86                       
87                       PEGASUS_NAMESPACE_END
88                       
89                       #endif /* Pegasus_LocalAuthFile_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2