|
10Duke Enterprise C++ SDK
|
#include <KnownNameLicenseTokenParser.h>
A license token parser, which expects the licensed item name to be one given in constructor.
Public Member Functions | |
| KnownNameLicenseTokenParser (const std::shared_ptr< const tenduke::jwt::JWTParser > &parseJwt, std::string licensedItemName) | |
| Constructs new instance. | |
| Public Member Functions inherited from tenduke::ee::licensing::impl::LicenseTokenParser | |
| LicenseTokenParser (const std::shared_ptr< const tenduke::jwt::JWTParser > &parseJwt) | |
| Constructs new instance. | |
| virtual LeaseOrError | from (const std::string &licenseToken) const |
| Parses the token. | |
Protected Member Functions | |
| bool | isLicensedItemName (const std::string &claimName, const std::string &claimValue) const override |
| Checks if given claim names the licensed item, e.g. | |
| tenduke::ee::licensing::impl::KnownNameLicenseTokenParser::KnownNameLicenseTokenParser | ( | const std::shared_ptr< const tenduke::jwt::JWTParser > & | parseJwt, |
| std::string | licensedItemName ) |
Constructs new instance.
| parseJwt | JWT parser for parsing the license token |
| licensedItemName | expected licensed item name |
|
overrideprotectedvirtual |
Checks if given claim names the licensed item, e.g.
"item-1": true.
This implementation guesses: any claim with value true, which is not a well-known claim or an error claim, can be the licensed item name. Subclasses check against known licensed item names.
| claimName | - |
| claimValue | - |
Reimplemented from tenduke::ee::licensing::impl::LicenseTokenParser.