]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: implement get_name() over RGWAuthEngine.
authorRadoslaw Zarzynski <rzarzynski@mirantis.com>
Fri, 8 Apr 2016 15:51:30 +0000 (17:51 +0200)
committerRadoslaw Zarzynski <rzarzynski@mirantis.com>
Thu, 2 Jun 2016 13:30:39 +0000 (15:30 +0200)
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
src/rgw/rgw_auth.h
src/rgw/rgw_swift_auth.h

index 99d99c7e39686879a3e63add7081bb692797c262..60765d471f60f0052db90ddbce4bb060056bcd8e 100644 (file)
@@ -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;
 };
 
index 60ede6fdfa16645f8452d2afd168fde0efb98f0e..8798a9d9fcfcec5ef6d07e99ed2a2f2428aba04d 100644 (file)
@@ -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;
 };