Mercurial > hg > orthanc-authorization
diff Plugin/Token.cpp @ 113:43154740ea2e
wip: checking labels
author | Alain Mazy <am@osimis.io> |
---|---|
date | Tue, 05 Sep 2023 12:48:20 +0200 |
parents | 1a13c4fbc9a1 |
children | 0eed78c1e177 |
line wrap: on
line diff
--- a/Plugin/Token.cpp Thu Aug 31 16:51:15 2023 +0200 +++ b/Plugin/Token.cpp Tue Sep 05 12:48:20 2023 +0200 @@ -32,4 +32,15 @@ throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange); } } + + Token::Token(const Token& other) : + type_(other.GetType()), + key_(other.GetKey()) + { + if (key_.empty()) + { + throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange); + } + } + }