12 #ifndef ROOT_TSecContext
13 #define ROOT_TSecContext
30 R__EXTERN
const TDatime kROOTTZERO;
33 class TSecContextCleanup;
36 class TSecContext :
public TObject {
38 friend class TRootSecContext;
52 virtual Bool_t CleanupSecContext(Bool_t all);
56 TSecContext(
const TSecContext&);
57 TSecContext& operator=(
const TSecContext&);
61 TSecContext(
const char *url, Int_t meth, Int_t offset,
62 const char *
id,
const char *token,
63 TDatime expdate = kROOTTZERO,
void *ctx = 0);
64 TSecContext(
const char *user,
const char *host, Int_t meth, Int_t offset,
65 const char *
id,
const char *token,
66 TDatime expdate = kROOTTZERO,
void *ctx = 0);
67 virtual ~TSecContext();
69 void AddForCleanup(Int_t port, Int_t proto, Int_t type);
70 virtual const char *AsString(TString &out);
72 virtual void DeActivate(Option_t *opt =
"CR");
73 void *GetContext()
const {
return fContext; }
74 TDatime GetExpDate()
const {
return fExpDate; }
75 const char *GetHost()
const {
return fHost; }
76 const char *GetID()
const {
return fID; }
77 Int_t GetMethod()
const {
return fMethod; }
78 const char *GetMethodName()
const {
return fMethodName; }
79 Int_t GetOffSet()
const {
return fOffSet; }
80 TList *GetSecContextCleanup()
const {
return fCleanup; }
81 const char *GetToken()
const {
return fToken; }
82 const char *GetUser()
const {
return fUser; }
84 Bool_t IsA(
const char *methodname);
85 Bool_t IsActive()
const;
87 virtual void Print(Option_t *option =
"F")
const;
89 void SetExpDate(TDatime expdate) { fExpDate= expdate; }
90 void SetID(
const char *
id) { fID= id; }
91 void SetOffSet(Int_t offset) { fOffSet = offset; }
92 void SetUser(
const char *user) { fUser = user; }
94 ClassDef(TSecContext,0)
108 class TSecContextCleanup :
public TObject {
112 Int_t fServerProtocol;
116 TSecContextCleanup(Int_t port, Int_t proto, Int_t type) :
117 fPort(port), fServerProtocol(proto), fServerType(type) { };
118 virtual ~TSecContextCleanup() { };
120 Int_t GetPort()
const {
return fPort; }
121 Int_t GetProtocol()
const {
return fServerProtocol; }
122 Int_t GetType()
const {
return fServerType; }
124 ClassDef(TSecContextCleanup,0)
139 TPwdCtx(
const char *pwd, Bool_t pwh): fPasswd(pwd), fPwHash(pwh) {};
140 virtual ~TPwdCtx() {};
142 const char *GetPasswd()
const {
return fPasswd; }
143 Bool_t IsPwHash()
const {
return fPwHash; }