Mercurial > hg > orthanc-authorization
comparison Plugin/AuthorizationWebService.h @ 29:bc0431cb6b8f
fix for compatibility with simplified OrthancPluginCppWrapper
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 04 Dec 2018 21:16:54 +0100 |
parents | d5d3cb00556a |
children | c304ffca5d80 |
comparison
equal
deleted
inserted
replaced
28:ae19947abf68 | 29:bc0431cb6b8f |
---|---|
23 namespace OrthancPlugins | 23 namespace OrthancPlugins |
24 { | 24 { |
25 class AuthorizationWebService : public IAuthorizationService | 25 class AuthorizationWebService : public IAuthorizationService |
26 { | 26 { |
27 private: | 27 private: |
28 OrthancPluginContext* context_; | |
29 std::string url_; | 28 std::string url_; |
30 std::string username_; | 29 std::string username_; |
31 std::string password_; | 30 std::string password_; |
32 | 31 |
33 bool IsGrantedInternal(unsigned int& validity, | 32 bool IsGrantedInternal(unsigned int& validity, |
35 const AccessedResource& access, | 34 const AccessedResource& access, |
36 const Token* token, | 35 const Token* token, |
37 const std::string& tokenValue); | 36 const std::string& tokenValue); |
38 | 37 |
39 public: | 38 public: |
40 AuthorizationWebService(OrthancPluginContext* context, | 39 AuthorizationWebService(const std::string& url) : |
41 const std::string& url); | 40 url_(url) |
41 { | |
42 } | |
42 | 43 |
43 void SetCredentials(const std::string& username, | 44 void SetCredentials(const std::string& username, |
44 const std::string& password); | 45 const std::string& password); |
45 | 46 |
46 virtual bool IsGranted(unsigned int& validity, | 47 virtual bool IsGranted(unsigned int& validity, |