From a540dcac2e672d237f0ce3813c400d8fe5928a5c Mon Sep 17 00:00:00 2001 From: Radoslaw Zarzynski Date: Fri, 8 Apr 2016 17:51:30 +0200 Subject: [PATCH] rgw: implement get_name() over RGWAuthEngine. Signed-off-by: Radoslaw Zarzynski --- src/rgw/rgw_auth.h | 11 +++++++++++ src/rgw/rgw_swift_auth.h | 12 ++++++++++++ 2 files changed, 23 insertions(+) diff --git a/src/rgw/rgw_auth.h b/src/rgw/rgw_auth.h index 99d99c7e39686..60765d471f60f 100644 --- a/src/rgw/rgw_auth.h +++ b/src/rgw/rgw_auth.h @@ -238,6 +238,9 @@ protected: RGWAuthEngine& operator=(const RGWAuthEngine&) = delete; public: + /* Get name of the auth engine. */ + virtual std::string get_name() const noexcept = 0; + /* Fast, non-throwing method for screening whether a concrete engine may * be interested in handling a specific request. */ virtual bool is_applicable() const noexcept = 0; @@ -296,6 +299,10 @@ public: apl_factory(apl_factory) { } + std::string get_name() const noexcept override { + return "RGWKeystoneAuthEngine"; + } + bool is_applicable() const noexcept override; RGWAuthApplier::aplptr_t authenticate() const override; }; @@ -316,6 +323,10 @@ public: return true; } + std::string get_name() const noexcept override { + return "RGWAnonymousAuthEngine"; + } + RGWAuthApplier::aplptr_t authenticate() const override; }; diff --git a/src/rgw/rgw_swift_auth.h b/src/rgw/rgw_swift_auth.h index 60ede6fdfa166..8798a9d9fcfce 100644 --- a/src/rgw/rgw_swift_auth.h +++ b/src/rgw/rgw_swift_auth.h @@ -52,6 +52,10 @@ public: } /* Interface implementations. */ + std::string get_name() const noexcept override { + return "RGWTempURLAuthEngine"; + } + bool is_applicable() const noexcept override; RGWAuthApplier::aplptr_t authenticate() const override; }; @@ -72,6 +76,10 @@ public: apl_factory(apl_factory) { } + std::string get_name() const noexcept override { + return "RGWSignedTokenAuthEngine"; + } + bool is_applicable() const noexcept override; RGWAuthApplier::aplptr_t authenticate() const override; }; @@ -92,6 +100,10 @@ public: apl_factory(apl_factory) { } + std::string get_name() const noexcept override { + return "RGWExternalTokenAuthEngine"; + } + bool is_applicable() const noexcept override; RGWAuthApplier::aplptr_t authenticate() const override; }; -- 2.39.5