Class X509CertificateExpression
Represents an expression that evaluates to True, if identity contains claims about specified X.509 certificate.
Implements
Inherited Members
Namespace: Nevatech.Vsb.Repository.Security
Assembly: Nevatech.Vsb.Repository.dll
Syntax
public sealed class X509CertificateExpression : AuthorizationExpressionBase, IValidator, IEquatable<AuthorizationExpressionBase>, IExtensibleDataObject
Constructors
X509CertificateExpression()
Declaration
public X509CertificateExpression()
Fields
ElementName
Name of the root element when object is serialized to XML.
Declaration
public const string ElementName = "X509"
Field Value
Type | Description |
---|---|
System.String |
Properties
FriendlyName
Gets or sets X.509 certificate's friendly name used to provide more readable info about certificate being used.
Declaration
public string FriendlyName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Thumbprint
Gets or sets X.509 certificate's thumbprint string.
Declaration
public string Thumbprint { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Methods
Create(X509Certificate2)
Create and populates new instance from provided X.509 certificate.
Declaration
public static X509CertificateExpression Create(X509Certificate2 certificate)
Parameters
Type | Name | Description |
---|---|---|
System.Security.Cryptography.X509Certificates.X509Certificate2 | certificate | X.509 certificate to be initialized from. |
Returns
Type | Description |
---|---|
X509CertificateExpression | New instance populated from provided X.509 certificate. |
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. |