blob: be8882bd9e201c279b9ab6ba66c5ed0887015b84 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
#ifndef ICE_PROXY_VERIFIER_H
#define ICE_PROXY_VERIFIER_H
#include <Ice/Ice.h>
#include <vector>
namespace Glacier2
{
//
// Base class for proxy rule implementations.
//
class ProxyRule
{
public:
virtual ~ProxyRule() {}
//
// Checks to see if the proxy passes.
//
virtual bool check(const std::shared_ptr<Ice::ObjectPrx>&) const = 0;
};
class ProxyVerifier final
{
public:
ProxyVerifier(std::shared_ptr<Ice::Communicator>);
~ProxyVerifier();
//
// Verifies that the proxy is permissible under the configured
// rules.
//
bool verify(const std::shared_ptr<Ice::ObjectPrx>&);
private:
const std::shared_ptr<Ice::Communicator> _communicator;
const int _traceLevel;
std::vector<ProxyRule*> _acceptRules;
std::vector<ProxyRule*> _rejectRules;
};
}
#endif
|