Class ClaimExpression
Represents an expression which evaluates to True, if provided identity contains at least one claim satisfying to expression's internal rules.
Implements
Inherited Members
Namespace: Nevatech.Vsb.Repository.Security
Assembly: Nevatech.Vsb.Repository.dll
Syntax
public sealed class ClaimExpression : AuthorizationExpressionBase, IValidator, IEquatable<AuthorizationExpressionBase>, IExtensibleDataObject
Remarks
Use online tool for testing Regular Expressions: http://regexhero.net/tester/
Constructors
ClaimExpression()
Instanciates an empty object.
Declaration
public ClaimExpression()
Fields
ElementName
Name of the root element when object is serialized to XML.
Declaration
public const string ElementName = "CLAIM"
Field Value
Type | Description |
---|---|
System.String |
Properties
ClaimIssuer
Gets or sets claim issuer name. If not set, then claims from all issuers are accepted.
Declaration
public string ClaimIssuer { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ClaimType
Gets or sets claim type name. If not set, then all claim types are accepted. See System.Security.Claims.ClaimTypes class for standard claim types.
Declaration
public string ClaimType { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ClaimValue
Gets or sets the exact value, regular expression, or XPath expression used to evaluate claim value according to the specified comparison type.
Declaration
public string ClaimValue { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Comparison
Gets or sets comparison type used to compare claim's original value with the value specified in this expression.
Declaration
public LogicalOperation Comparison { get; set; }
Property Value
Type | Description |
---|---|
LogicalOperation |
Namespaces
Gets or sets collection of mappings between prefixes and namespaces used in XPath expression. This property is used for XML serialization.
Declaration
public XmlSerializerNamespaces Namespaces { get; set; }
Property Value
Type | Description |
---|---|
System.Xml.Serialization.XmlSerializerNamespaces |
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 |
---|---|
System.Boolean | 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 |
---|---|---|
System.Object | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
System.Boolean | 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 |
---|---|
System.Boolean | 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 |
---|---|
System.Int32 | Hash code for the value of this instance. |
Overrides
ToString()
Returns string representation of the object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | String representing the object's content. |
Overrides
Validate()
Evaluates the state of the object.
Declaration
public override bool Validate()
Returns
Type | Description |
---|---|
System.Boolean | True if state is valid; otherwise, false. |