XRootD
XrdSciTokensMon.cc
Go to the documentation of this file.
1
/******************************************************************************/
2
/* */
3
/* X r d S c i T o k e n s M o n . c c */
4
/* */
5
/******************************************************************************/
6
7
#include "
XrdSciTokens/XrdSciTokensMon.hh
"
8
#include "
XrdSec/XrdSecEntity.hh
"
9
#include "
XrdSec/XrdSecMonitor.hh
"
10
11
/******************************************************************************/
12
/* R e p o r t */
13
/******************************************************************************/
14
15
void
XrdSciTokensMon::Mon_Report
(
const
XrdSecEntity
& Entity,
16
const
std::string& subject,
17
const
std::string& username)
18
{
19
// Create record
20
//
21
if
(Entity.
secMon
)
22
{
char
buff[2048];
23
snprintf(buff,
sizeof
(buff),
24
"s=%s&n=%s&o=%s&r=%s&g=%.1024s"
,
25
subject.c_str(),username.c_str(),
26
(Entity.
vorg
? Entity.
vorg
:
""
),
27
(Entity.
role
? Entity.
role
:
""
),
28
(Entity.
grps
? Entity.
grps
:
""
));
29
Entity.
secMon
->
Report
(
XrdSecMonitor::TokenInfo
, buff);
30
}
31
}
XrdSciTokensMon.hh
XrdSecEntity.hh
XrdSecMonitor.hh
XrdSciTokensMon::Mon_Report
void Mon_Report(const XrdSecEntity &Entity, const std::string &subject, const std::string &username)
Definition:
XrdSciTokensMon.cc:15
XrdSecEntity
Definition:
XrdSecEntity.hh:65
XrdSecEntity::vorg
char * vorg
Entity's virtual organization(s)
Definition:
XrdSecEntity.hh:71
XrdSecEntity::secMon
XrdSecMonitor * secMon
If !0 security monitoring enabled.
Definition:
XrdSecEntity.hh:89
XrdSecEntity::grps
char * grps
Entity's group name(s)
Definition:
XrdSecEntity.hh:73
XrdSecEntity::role
char * role
Entity's role(s)
Definition:
XrdSecEntity.hh:72
XrdSecMonitor::TokenInfo
@ TokenInfo
Definition:
XrdSecMonitor.hh:37
XrdSecMonitor::Report
virtual bool Report(WhatInfo infoT, const char *info)=0
XrdSciTokens
XrdSciTokensMon.cc
Generated by
1.9.1