Mercurial > hg > orthanc
diff OrthancServer/Sources/main.cpp @ 4343:e1e918e790e8
New function in the SDK: OrthancPluginGenerateRestApiAuthorizationToken()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 04 Dec 2020 18:28:23 +0100 |
parents | a01b1c9cbef4 |
children | 3dffe8f7af48 |
line wrap: on
line diff
--- a/OrthancServer/Sources/main.cpp Thu Dec 03 18:48:06 2020 +0100 +++ b/OrthancServer/Sources/main.cpp Fri Dec 04 18:28:23 2020 +0100 @@ -465,6 +465,16 @@ { } + virtual bool IsValidBearerToken(const std::string& token) ORTHANC_OVERRIDE + { +#if ORTHANC_ENABLE_PLUGINS == 1 + return (plugins_ != NULL && + plugins_->IsValidAuthorizationToken(token)); +#else + return false; +#endif + } + virtual bool IsAllowed(HttpMethod method, const char* uri, const char* ip,