Mercurial > hg > orthanc-authorization
comparison Plugin/CachedAuthorizationService.h @ 74:aa73b10c2db9
new API route to decode tokens
author | Alain Mazy <am@osimis.io> |
---|---|
date | Fri, 03 Mar 2023 18:03:22 +0100 |
parents | 512247750f0a |
children | 7381a7674b36 |
comparison
equal
deleted
inserted
replaced
73:512247750f0a | 74:aa73b10c2db9 |
---|---|
79 virtual bool HasTokenValidation() const | 79 virtual bool HasTokenValidation() const |
80 { | 80 { |
81 return decorated_->HasTokenValidation(); | 81 return decorated_->HasTokenValidation(); |
82 } | 82 } |
83 | 83 |
84 bool CreateToken(IAuthorizationService::CreatedToken& response, | 84 virtual bool CreateToken(IAuthorizationService::CreatedToken& response, |
85 const std::string& tokenType, | 85 const std::string& tokenType, |
86 const std::string& id, | 86 const std::string& id, |
87 const std::vector<IAuthorizationService::OrthancResource>& resources, | 87 const std::vector<IAuthorizationService::OrthancResource>& resources, |
88 const std::string& expirationDateString, | 88 const std::string& expirationDateString, |
89 const uint64_t& validityDuration) | 89 const uint64_t& validityDuration) |
90 { | 90 { |
91 return decorated_->CreateToken(response, | 91 return decorated_->CreateToken(response, |
92 tokenType, | 92 tokenType, |
93 id, | 93 id, |
94 resources, | 94 resources, |
95 expirationDateString, | 95 expirationDateString, |
96 validityDuration); | 96 validityDuration); |
97 } | 97 } |
98 | 98 |
99 virtual bool DecodeToken(DecodedToken& response, | |
100 const std::string& tokenKey, | |
101 const std::string& tokenValue) | |
102 { | |
103 return decorated_->DecodeToken(response, | |
104 tokenKey, | |
105 tokenValue); | |
106 } | |
107 | |
99 }; | 108 }; |
100 } | 109 } |