CernVM-FS
2.12.0
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
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
18
enum
AuthzTokenType
{
19
kTokenUnknown
= 0,
20
kTokenX509
,
21
kTokenBearer
,
22
};
23
28
struct
AuthzToken
{
29
AuthzToken
() :
type
(
kTokenUnknown
),
data
(NULL),
size
(0) { }
30
AuthzToken
*
DeepCopy
();
31
32
AuthzTokenType
type
;
33
void
*
data
;
34
unsigned
size
;
35
};
36
37
38
enum
AuthzStatus
{
39
kAuthzOk
= 0,
40
kAuthzNotFound
,
41
kAuthzInvalid
,
42
kAuthzNotMember
,
43
kAuthzNoHelper
,
44
kAuthzUnknown
,
45
};
46
47
53
struct
AuthzData
{
54
AuthzData
() :
deadline
(0),
status
(
kAuthzUnknown
) { }
58
bool
IsGranted
(
const
std::string &expected_membership)
const
{
59
return
(
status
==
kAuthzOk
) && (
membership
== expected_membership);
60
}
61
AuthzToken
token
;
62
uint64_t
deadline
;
63
std::string
membership
;
64
AuthzStatus
status
;
65
};
66
67
#endif // CVMFS_AUTHZ_AUTHZ_H_
AuthzData::AuthzData
AuthzData()
Definition:
authz.h:54
kAuthzOk
Definition:
authz.h:39
kAuthzNotFound
Definition:
authz.h:40
AuthzToken::data
void * data
Definition:
authz.h:33
AuthzData::token
AuthzToken token
Definition:
authz.h:61
AuthzToken::DeepCopy
AuthzToken * DeepCopy()
Definition:
authz.cc:11
kAuthzNotMember
Definition:
authz.h:42
kAuthzNoHelper
Definition:
authz.h:43
kAuthzUnknown
Definition:
authz.h:44
AuthzToken::AuthzToken
AuthzToken()
Definition:
authz.h:29
kTokenBearer
Definition:
authz.h:21
AuthzData::membership
std::string membership
Definition:
authz.h:63
AuthzToken
Definition:
authz.h:28
AuthzData
Definition:
authz.h:53
AuthzToken::type
AuthzTokenType type
Definition:
authz.h:32
AuthzTokenType
AuthzTokenType
Definition:
authz.h:18
AuthzToken::size
unsigned size
Definition:
authz.h:34
AuthzData::status
AuthzStatus status
Definition:
authz.h:64
AuthzData::IsGranted
bool IsGranted(const std::string &expected_membership) const
Definition:
authz.h:58
kAuthzInvalid
Definition:
authz.h:41
kTokenUnknown
Definition:
authz.h:19
kTokenX509
Definition:
authz.h:20
AuthzStatus
AuthzStatus
Definition:
authz.h:38
AuthzData::deadline
uint64_t deadline
Definition:
authz.h:62
cvmfs
cvmfs
authz
authz.h
Generated on Sun Oct 13 2024 00:21:12 for CernVM-FS by
1.8.5