Commit
f68550b14a0ad1a74acada80e15dfc9c46c2703b
Fixed authorisation check
...
|
...
|
@@ -66,6 +66,8 @@ int run(const shared_ptr<Ice::Communicator>& communicator) |
66
|
66
|
ctx["token"] = token; |
67
|
67
|
auto proxy2 = proxy->ice_context(ctx); |
68
|
68
|
proxy2->function(); |
|
69
|
+ proxy->function(ctx); |
|
70
|
+ proxy->function(); |
69
|
71
|
|
70
|
72
|
return 0; |
71
|
73
|
} |
...
|
...
|
|
...
|
...
|
@@ -18,6 +18,8 @@ ContextI::function(const Ice::Current& c) |
18
|
18
|
{ |
19
|
19
|
// check token |
20
|
20
|
const auto p = c.ctx.find("token"); |
|
21
|
+ if (p == c.ctx.end()) |
|
22
|
+ return; |
21
|
23
|
if (p != c.ctx.end() && p->second != "secretToken") |
22
|
24
|
return; |
23
|
25
|
cout << "function" << endl; |
...
|
...
|
|