CernVM-FS  2.12.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
authz.h
Go to the documentation of this file.
1 
7 #ifndef CVMFS_AUTHZ_AUTHZ_H_
8 #define CVMFS_AUTHZ_AUTHZ_H_
9 
10 #include <inttypes.h>
11 
12 #include <string>
13 
22 };
23 
28 struct AuthzToken {
29  AuthzToken() : type(kTokenUnknown), data(NULL), size(0) { }
31 
33  void *data;
34  unsigned size;
35 };
36 
37 
39  kAuthzOk = 0,
45 };
46 
47 
53 struct AuthzData {
58  bool IsGranted(const std::string &expected_membership) const {
59  return (status == kAuthzOk) && (membership == expected_membership);
60  }
62  uint64_t deadline;
63  std::string membership;
65 };
66 
67 #endif // CVMFS_AUTHZ_AUTHZ_H_
AuthzData()
Definition: authz.h:54
Definition: authz.h:39
void * data
Definition: authz.h:33
AuthzToken token
Definition: authz.h:61
AuthzToken * DeepCopy()
Definition: authz.cc:11
AuthzToken()
Definition: authz.h:29
std::string membership
Definition: authz.h:63
AuthzTokenType type
Definition: authz.h:32
AuthzTokenType
Definition: authz.h:18
unsigned size
Definition: authz.h:34
AuthzStatus status
Definition: authz.h:64
bool IsGranted(const std::string &expected_membership) const
Definition: authz.h:58
AuthzStatus
Definition: authz.h:38
uint64_t deadline
Definition: authz.h:62