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 
8 #include "XrdSec/XrdSecEntity.hh"
10 
11 /******************************************************************************/
12 /* R e p o r t */
13 /******************************************************************************/
14 
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 }
void Mon_Report(const XrdSecEntity &Entity, const std::string &subject, const std::string &username)
char * vorg
Entity's virtual organization(s)
Definition: XrdSecEntity.hh:71
XrdSecMonitor * secMon
If !0 security monitoring enabled.
Definition: XrdSecEntity.hh:89
char * grps
Entity's group name(s)
Definition: XrdSecEntity.hh:73
char * role
Entity's role(s)
Definition: XrdSecEntity.hh:72
virtual bool Report(WhatInfo infoT, const char *info)=0