A security manager which defines what is accessible by Nitro.
Public Member Functions | |
NitroDomainManager () | |
Creates a default security manager which allows the Nitro and System namespaces. More... | |
void | ClearDefaultReferences () |
Clears all default references. More... | |
List< CodeReference > | GetDefaultReferences () |
Gets the default references. More... | |
bool | AllowsEverything () |
This value states if this domain allows every type. Do note that the NitroDomainManager type is always blocked. More... | |
bool | IsAllowed (Type type) |
Checks if the named type is allowed by this domain. More... | |
virtual bool | AllowAccess (string protocol, string host, string fullPath) |
Checks if the given remote location is allowed any access at all. Note that this can internally update the domain itself if it wants to apply further restrictions. More... | |
Static Public Member Functions | |
static NitroDomainManager | GetDefaultManager () |
Gets the default security manager. More... | |
Protected Member Functions | |
void | AddReference (string text) |
Adds the given text as a reference. Must also include the assembly unless it is in 'this' one. More... | |
void | AllowEverything () |
Call this to make this domain allow any type except for those in its block list. More... | |
void | Allow (string name) |
Lets this domain allow the given type/ namespace. You must derive this class and call this from within the constructor. More... | |
void | Block (string name) |
Lets this domain block the given type/ namespace. Used when this domain allows everything except a certain few. You must derive this class and call this from within the constructor. More... | |
Private Member Functions | |
bool | Blocked (Type type) |
Checks if the given type is blocked by this domain. More... | |
Private Attributes | |
bool | AllowAll |
True if this domain allows everything. More... | |
List< SecureName > | BlockedNames |
A set of all blocked types by name. More... | |
List< CodeReference > | DefaultReferences |
A set of classes included and allowed by default. More... | |
List< SecureName > | AllowedNames =new List<SecureName>() |
A set of all allowed types by name. More... | |
Static Private Attributes | |
static NitroDomainManager | DefaultManager =new NitroDomainManager() |
The default security manager if none is provided. More... | |
|
inline |
Creates a default security manager which allows the Nitro and System namespaces.
|
inlineprotected |
Adds the given text as a reference. Must also include the assembly unless it is in 'this' one.
text | The reference to add, e.g. "Nitro" or "System.System". |
|
inlineprotected |
Lets this domain allow the given type/ namespace. You must derive this class and call this from within the constructor.
name | The type/ namespace to allow. |
|
inlinevirtual |
Checks if the given remote location is allowed any access at all. Note that this can internally update the domain itself if it wants to apply further restrictions.
protocol | The protocol:// of the remote location. Lowercase and usually e.g. http(s). |
host | The first part of the location after the protocol. E.g. www.kulestar.com. |
fullPath | The whole path requesting access. E.g. http://www.kulestar.com/. |
|
inlineprotected |
Call this to make this domain allow any type except for those in its block list.
|
inline |
This value states if this domain allows every type. Do note that the NitroDomainManager type is always blocked.
|
inlineprotected |
Lets this domain block the given type/ namespace. Used when this domain allows everything except a certain few. You must derive this class and call this from within the constructor.
name | The name of the type/ namespace to block. |
|
inlineprivate |
Checks if the given type is blocked by this domain.
type | The type to check for. |
|
inline |
Clears all default references.
|
inlinestatic |
Gets the default security manager.
|
inline |
Gets the default references.
|
inline |
Checks if the named type is allowed by this domain.
name | The type to check for. |
|
private |
True if this domain allows everything.
|
private |
A set of all allowed types by name.
|
private |
A set of all blocked types by name.
|
staticprivate |
The default security manager if none is provided.
|
private |
A set of classes included and allowed by default.