Class JsonPointerExpression
Represents an expression that evaluates to True, if provided JSON pointer expression (https://tools.ietf.org/html/rfc6901) matches a value in the request message and that satisfies the specified condition.
Inherited Members
Namespace: Nevatech.Vsb.Repository.Security
Assembly: Nevatech.Vsb.Repository.dll
Syntax
[DataContract(Namespace = "http://schemas.nevatech.com/sentinet/2011/02")]
public sealed class JsonPointerExpression : AuthorizationExpressionBase, IValidator, IEquatable<AuthorizationExpressionBase>, IExtensibleDataObject
Constructors
JsonPointerExpression()
Initializes an empty instance.
Declaration
public JsonPointerExpression()
Fields
ElementName
Name of the root element when object is serialized to XML.
Declaration
public const string ElementName = "JSON-POINTER"
Field Value
| Type | Description |
|---|---|
| string |
Properties
Comparison
Gets or sets comparison type used to compare the resolved JSON value with the value specified in this expression. Note that XPath comparison is not supported.
Declaration
[DataMember]
public LogicalOperation Comparison { get; set; }
Property Value
| Type | Description |
|---|---|
| LogicalOperation |
JsonPointer
Gets or sets JSON pointer expression that has to evaluate to a boolean value.
Declaration
[DataMember]
public string JsonPointer { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Value
Gets or sets the exact value or a regular expression used to evaluate the resolved JSON value according to the specified comparison type.
Declaration
[DataMember]
public string Value { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
Equals(AuthorizationExpressionBase)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(AuthorizationExpressionBase other)
Parameters
| Type | Name | Description |
|---|---|---|
| AuthorizationExpressionBase | other | The object to compare with the current object. |
Returns
| Type | Description |
|---|---|
| bool | True if the specified object is equal to the current object; otherwise, false. |
Overrides
Equals(object)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj | The object to compare with the current object. |
Returns
| Type | Description |
|---|---|
| bool | True if the specified object is equal to the current object; otherwise, false. |
Overrides
Evaluate(AuthorizationExpressionContext)
Returns True, if provided identity is authorized to proceed with the service call.
Declaration
public override bool Evaluate(AuthorizationExpressionContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| AuthorizationExpressionContext | context | Provides the message evaluation context. |
Returns
| Type | Description |
|---|---|
| bool | True, if provided identity is authorized to proceed with the service call. False, otherwise. |
Overrides
GetHashCode()
Returns hash code for the value of this instance.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int | Hash code for the value of this instance. |
Overrides
ToString()
Returns string representation of the object.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | String representing the object's content. |
Overrides
Validate()
Evaluates the state of the object.
Declaration
[SuppressMessage("Microsoft.Usage", "CA1806:DoNotIgnoreMethodResults", MessageId = "System.Text.RegularExpressions.Regex")]
public override bool Validate()
Returns
| Type | Description |
|---|---|
| bool | True if state is valid; otherwise, false. |