Skip to content

Commit cf3d4a0

Browse files
committed
add ANONYMOUS_IDENTIFICATION to SecurityMode
1 parent a145c66 commit cf3d4a0

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

include/netlicensing/context.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ class Context {
1313
public:
1414
enum SecurityMode {
1515
BASIC_AUTHENTICATION,
16-
APIKEY_IDENTIFICATION
16+
APIKEY_IDENTIFICATION,
17+
ANONYMOUS_IDENTIFICATION
1718
};
1819

1920
Context();

src/context.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,7 @@ const std::string& Context::user() const {
337337
switch (mode_) {
338338
case BASIC_AUTHENTICATION: return username_;
339339
case APIKEY_IDENTIFICATION: return apiKey;
340+
case ANONYMOUS_IDENTIFICATION: return NULL;
340341
}
341342

342343
throw MalformedArgumentsException("Unknown authentication mode");
@@ -346,6 +347,7 @@ const std::string& Context::pass() const {
346347
switch (mode_) {
347348
case BASIC_AUTHENTICATION: return password_;
348349
case APIKEY_IDENTIFICATION: return api_key_;
350+
case ANONYMOUS_IDENTIFICATION: return NULL;
349351
}
350352

351353
throw MalformedArgumentsException("Unknown authentication mode");

0 commit comments

Comments
 (0)