comparison Plugin/AuthorizationWebService.h @ 54:317b31e99501

Added 3 new configurations: WebServiceUsername, WebServicePassword, WebServiceIdentifier. WebServiceIdentifier is now included in the payload as the 'identifier' field
author Alain Mazy <am@osimis.io>
date Mon, 26 Sep 2022 15:20:39 +0200
parents 914b8113fd46
children 1a13c4fbc9a1
comparison
equal deleted inserted replaced
53:01e0c35e004c 54:317b31e99501
26 { 26 {
27 private: 27 private:
28 std::string url_; 28 std::string url_;
29 std::string username_; 29 std::string username_;
30 std::string password_; 30 std::string password_;
31 std::string identifier_;
31 32
32 bool IsGrantedInternal(unsigned int& validity, 33 bool IsGrantedInternal(unsigned int& validity,
33 OrthancPluginHttpMethod method, 34 OrthancPluginHttpMethod method,
34 const AccessedResource& access, 35 const AccessedResource& access,
35 const Token* token, 36 const Token* token,
41 { 42 {
42 } 43 }
43 44
44 void SetCredentials(const std::string& username, 45 void SetCredentials(const std::string& username,
45 const std::string& password); 46 const std::string& password);
47
48 void SetIdentifier(const std::string& webServiceIdentifier);
46 49
47 virtual bool IsGranted(unsigned int& validity, 50 virtual bool IsGranted(unsigned int& validity,
48 OrthancPluginHttpMethod method, 51 OrthancPluginHttpMethod method,
49 const AccessedResource& access, 52 const AccessedResource& access,
50 const Token& token, 53 const Token& token,