Macaroons::Handler Class Reference

#include <XrdMacaroonsHandler.hh>

Inheritance diagram for Macaroons::Handler:
Inheritance graph
[legend]
Collaboration diagram for Macaroons::Handler:
Collaboration graph
[legend]

List of all members.

Public Types

enum  AuthzBehavior { PASSTHROUGH, ALLOW, DENY }

Public Member Functions

 Handler (XrdSysError *log, const char *config, XrdOucEnv *myEnv, XrdAccAuthorize *chain)
virtual ~Handler ()
virtual bool MatchesPath (const char *verb, const char *path) override
 Tells if the incoming path is recognized as one of the paths that have to be processed.
virtual int ProcessReq (XrdHttpExtReq &req) override
virtual int Init (const char *cfgfile) override
 Initializes the external request handler.

Static Public Member Functions

static bool Config (const char *config, XrdOucEnv *env, XrdSysError *log, std::string &location, std::string &secret, ssize_t &max_duration, AuthzBehavior &behavior)

Private Member Functions

std::string GenerateID (const std::string &, const XrdSecEntity &, const std::string &, const std::vector< std::string > &, const std::string &)
std::string GenerateActivities (const XrdHttpExtReq &, const std::string &) const
int ProcessOAuthConfig (XrdHttpExtReq &req)
int ProcessTokenRequest (XrdHttpExtReq &req)
int GenerateMacaroonResponse (XrdHttpExtReq &req, const std::string &response, const std::vector< std::string > &, ssize_t validity, bool oauth_response)

Static Private Member Functions

static bool xsecretkey (XrdOucStream &Config, XrdSysError *log, std::string &secret)
static bool xsitename (XrdOucStream &Config, XrdSysError *log, std::string &location)
static bool xtrace (XrdOucStream &Config, XrdSysError *log)
static bool xmaxduration (XrdOucStream &Config, XrdSysError *log, ssize_t &max_duration)

Private Attributes

ssize_t m_max_duration
XrdAccAuthorizem_chain
XrdSysErrorm_log
std::string m_location
std::string m_secret

Member Enumeration Documentation

Enumerator:
PASSTHROUGH 
ALLOW 
DENY 

Constructor & Destructor Documentation

Macaroons::Handler::Handler ( XrdSysError log,
const char *  config,
XrdOucEnv myEnv,
XrdAccAuthorize chain 
) [inline]
virtual Macaroons::Handler::~Handler (  )  [virtual]

Member Function Documentation

static bool Macaroons::Handler::Config ( const char *  config,
XrdOucEnv env,
XrdSysError log,
std::string &  location,
std::string &  secret,
ssize_t &  max_duration,
AuthzBehavior behavior 
) [static]

Referenced by Handler().

std::string Macaroons::Handler::GenerateActivities ( const XrdHttpExtReq ,
const std::string &   
) const [private]
std::string Macaroons::Handler::GenerateID ( const std::string &  ,
const XrdSecEntity ,
const std::string &  ,
const std::vector< std::string > &  ,
const std::string &   
) [private]
int Macaroons::Handler::GenerateMacaroonResponse ( XrdHttpExtReq req,
const std::string &  response,
const std::vector< std::string > &  ,
ssize_t  validity,
bool  oauth_response 
) [private]
virtual int Macaroons::Handler::Init ( const char *  cfgfile  )  [inline, override, virtual]

Initializes the external request handler.

Implements XrdHttpExtHandler.

virtual bool Macaroons::Handler::MatchesPath ( const char *  verb,
const char *  path 
) [override, virtual]

Tells if the incoming path is recognized as one of the paths that have to be processed.

Implements XrdHttpExtHandler.

int Macaroons::Handler::ProcessOAuthConfig ( XrdHttpExtReq req  )  [private]
virtual int Macaroons::Handler::ProcessReq ( XrdHttpExtReq  )  [override, virtual]

Process an HTTP request and send the response using the calling XrdHttpProtocol instance directly Returns 0 if ok, non0 if errors

Implements XrdHttpExtHandler.

int Macaroons::Handler::ProcessTokenRequest ( XrdHttpExtReq req  )  [private]
static bool Macaroons::Handler::xmaxduration ( XrdOucStream Config,
XrdSysError log,
ssize_t &  max_duration 
) [static, private]
static bool Macaroons::Handler::xsecretkey ( XrdOucStream Config,
XrdSysError log,
std::string &  secret 
) [static, private]
static bool Macaroons::Handler::xsitename ( XrdOucStream Config,
XrdSysError log,
std::string &  location 
) [static, private]
static bool Macaroons::Handler::xtrace ( XrdOucStream Config,
XrdSysError log 
) [static, private]

Member Data Documentation

std::string Macaroons::Handler::m_location [private]

Referenced by Handler().

Referenced by Handler().

Referenced by Handler().

std::string Macaroons::Handler::m_secret [private]

Referenced by Handler().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 19 Oct 2019 for xrootd by  doxygen 1.6.1