comparison Plugin/BaseAuthorizationService.h @ 109:7381a7674b36

wip: adding labels
author Alain Mazy <am@osimis.io>
date Fri, 18 Aug 2023 12:08:49 +0200
parents aa73b10c2db9
children 43154740ea2e
comparison
equal deleted inserted replaced
108:68ce6fd8b22a 109:7381a7674b36
34 const AccessedResource& access, 34 const AccessedResource& access,
35 const Token* token, 35 const Token* token,
36 const std::string& tokenValue) = 0; 36 const std::string& tokenValue) = 0;
37 37
38 virtual bool GetUserProfileInternal(unsigned int& validity, 38 virtual bool GetUserProfileInternal(unsigned int& validity,
39 Json::Value& profile /* out */, 39 UserProfile& profile /* out */,
40 const Token* token, 40 const Token* token,
41 const std::string& tokenValue) = 0; 41 const std::string& tokenValue) = 0;
42 42
43 virtual bool HasUserPermissionInternal(unsigned int& validity, 43 virtual bool HasUserPermissionInternal(unsigned int& validity,
44 const std::string& permission, 44 const std::string& permission,
65 { 65 {
66 return IsGrantedInternal(validity, method, access, NULL, ""); 66 return IsGrantedInternal(validity, method, access, NULL, "");
67 } 67 }
68 68
69 virtual bool GetUserProfile(unsigned int& validity, 69 virtual bool GetUserProfile(unsigned int& validity,
70 Json::Value& profile /* out */, 70 UserProfile& profile /* out */,
71 const Token& token, 71 const Token& token,
72 const std::string& tokenValue) 72 const std::string& tokenValue)
73 { 73 {
74 return GetUserProfileInternal(validity, profile, &token, tokenValue); 74 return GetUserProfileInternal(validity, profile, &token, tokenValue);
75 } 75 }
76 76
77 virtual bool GetAnonymousUserProfile(unsigned int& validity /* out */, 77 virtual bool GetAnonymousUserProfile(unsigned int& validity /* out */,
78 Json::Value& profile /* out */) 78 UserProfile& profile /* out */)
79 { 79 {
80 return GetUserProfileInternal(validity, profile, NULL, ""); 80 return GetUserProfileInternal(validity, profile, NULL, "");
81 } 81 }
82 82
83 virtual bool HasUserPermission(unsigned int& validity /* out */, 83 virtual bool HasUserPermission(unsigned int& validity /* out */,