diff Plugin/AuthorizationWebService.h @ 69:af44dce56328

new 'auth/user-profile' Rest API route
author Alain Mazy <am@osimis.io>
date Mon, 20 Feb 2023 11:56:14 +0100
parents 1a13c4fbc9a1
children 30fb3ce960d9
line wrap: on
line diff
--- a/Plugin/AuthorizationWebService.h	Fri Feb 17 15:05:02 2023 +0100
+++ b/Plugin/AuthorizationWebService.h	Mon Feb 20 11:56:14 2023 +0100
@@ -29,6 +29,7 @@
     std::string username_;
     std::string password_;
     std::string identifier_;
+    std::string userProfileUrl_;
 
     bool IsGrantedInternal(unsigned int& validity,
                            OrthancPluginHttpMethod method,
@@ -47,6 +48,8 @@
 
     void SetIdentifier(const std::string& webServiceIdentifier);
 
+    void SetUserProfileUrl(const std::string& url);
+
     virtual bool IsGranted(unsigned int& validity,
                            OrthancPluginHttpMethod method,
                            const AccessedResource& access,
@@ -62,5 +65,10 @@
     {
       return IsGrantedInternal(validity, method, access, NULL, "");
     }
+
+    virtual bool GetUserProfile(Json::Value& profile /* out */,
+                                const Token& token,
+                                const std::string& tokenValue);
+
   };
 }