Mercurial > hg > orthanc-authorization
comparison Plugin/IAuthorizationService.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 |
comparison
equal
deleted
inserted
replaced
68:1a13c4fbc9a1 | 69:af44dce56328 |
---|---|
21 #include "AccessedResource.h" | 21 #include "AccessedResource.h" |
22 #include "Token.h" | 22 #include "Token.h" |
23 | 23 |
24 #include <orthanc/OrthancCPlugin.h> | 24 #include <orthanc/OrthancCPlugin.h> |
25 #include <boost/noncopyable.hpp> | 25 #include <boost/noncopyable.hpp> |
26 #include <json/json.h> | |
26 | 27 |
27 namespace OrthancPlugins | 28 namespace OrthancPlugins |
28 { | 29 { |
29 // NOTE: This interface must be thread-safe | 30 // NOTE: This interface must be thread-safe |
30 class IAuthorizationService : public boost::noncopyable | 31 class IAuthorizationService : public boost::noncopyable |
41 const std::string& tokenValue) = 0; | 42 const std::string& tokenValue) = 0; |
42 | 43 |
43 virtual bool IsGranted(unsigned int& validity /* out */, | 44 virtual bool IsGranted(unsigned int& validity /* out */, |
44 OrthancPluginHttpMethod method, | 45 OrthancPluginHttpMethod method, |
45 const AccessedResource& access) = 0; | 46 const AccessedResource& access) = 0; |
47 | |
48 virtual bool GetUserProfile(Json::Value& profile /* out */, | |
49 const Token& token, | |
50 const std::string& tokenValue) = 0; | |
46 }; | 51 }; |
47 } | 52 } |