Class IdentityDefinitionBase
Represents a base class for all identity definition objects.
Inheritance
Implements
Inherited Members
Namespace: Nevatech.Vsb.Repository.Services.Identities
Assembly: Nevatech.Vsb.Repository.dll
Syntax
public abstract class IdentityDefinitionBase : IExtensibleDataObject
Constructors
IdentityDefinitionBase()
Initializes an empty instance.
Declaration
protected IdentityDefinitionBase()
IdentityDefinitionBase(Identity)
Initializes new instance from provided Identity object.
Declaration
protected IdentityDefinitionBase(Identity identity)
Parameters
Type | Name | Description |
---|---|---|
Identity | identity | Identity object used to populate new instance. |
Properties
Created
Gets this object's created date and time.
Declaration
public DateTime Created { get; protected set; }
Property Value
Type | Description |
---|---|
DateTime |
Expired
Gets or sets the UTC date and time when identity expires and can no longer be used. If Null, then identity never expires.
Declaration
public DateTime? Expired { get; set; }
Property Value
Type | Description |
---|---|
Nullable<DateTime> |
ExtensionData
Gets or sets ExtensionDataObject that enables serialization round-trips.
Declaration
public ExtensionDataObject ExtensionData { get; set; }
Property Value
Type | Description |
---|---|
ExtensionDataObject |
FriendlyName
Gets friendly name describing stored identity.
Declaration
public abstract string FriendlyName { get; protected set; }
Property Value
Type | Description |
---|---|
String |
Id
Gets or sets identity's database identifier.
Declaration
public int Id { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
IsEndpointIdentity
Gets flag indicating that identity can be used to create EndpointIdentity.
Declaration
public virtual bool IsEndpointIdentity { get; }
Property Value
Type | Description |
---|---|
Boolean |
Key
Gets or sets identity's unique identifier.
Declaration
public Guid Key { get; set; }
Property Value
Type | Description |
---|---|
Guid |
Kind
Gets stored identity kind (like X.509 certificate, SPN, etc).
Declaration
public abstract IdentityKind Kind { get; protected set; }
Property Value
Type | Description |
---|---|
IdentityKind |
Updated
Gets this object's updated date and time.
Declaration
public DateTime? Updated { get; protected set; }
Property Value
Type | Description |
---|---|
Nullable<DateTime> |
Methods
Create(Identity)
Returns an instance of specific identity definition populated from provided Identity object.
Declaration
public static IdentityDefinitionBase Create(Identity identity)
Parameters
Type | Name | Description |
---|---|---|
Identity | identity | Identity used to populate specific identity definition. |
Returns
Type | Description |
---|---|
IdentityDefinitionBase | Instance of specific identity definition populated from provided Identity object. |
Create(EndpointIdentity)
Returns an instance of specific service identity definition populated from provided EndpointIdentity object.
Declaration
public static IdentityDefinitionBase Create(EndpointIdentity identity)
Parameters
Type | Name | Description |
---|---|---|
EndpointIdentity | identity | Endpoint identity used to populate specific identity definition. |
Returns
Type | Description |
---|---|
IdentityDefinitionBase | Instance of specific service identity definition populated from provided EndpointIdentity object. |
GetConfiguration()
Returns endpoint <identity/> configuration element corresponding to the identity stored in this instance. This method is applied to service identities only.
Declaration
public virtual string GetConfiguration()
Returns
Type | Description |
---|---|
String | Endpoint <identity/> configuration element corresponding to the identity stored in this instance. |
Exceptions
Type | Condition |
---|---|
NotSupportedException | Thrown, if this method is called on the client identity type. |
GetEndpointIdentity()
Returns EndpointIdentity object populated with the data stored in this instance. This method is applied to service identities only.
Declaration
public virtual EndpointIdentity GetEndpointIdentity()
Returns
Type | Description |
---|---|
EndpointIdentity | EndpointIdentity object populated with the data stored in this instance. |
Exceptions
Type | Condition |
---|---|
NotSupportedException | Thrown, if this method is called on the client identity type. |
GetIdentity()
Returns Identity object populated with the data stored in this instance. The returned object can be used to persist identity data to database.
Declaration
public virtual Identity GetIdentity()
Returns
Type | Description |
---|---|
Identity | Identity object populated with the data stored in this instance. |
IsMatch(IdentityDefinitionBase, IdentityDefinitionBase)
Returns flag indicating that provided instances represent the same entity, i.e. the object's natural keys are the same. This method assumes that both instances are assigned to the same parent object.
Declaration
public static bool IsMatch(IdentityDefinitionBase identity1, IdentityDefinitionBase identity2)
Parameters
Type | Name | Description |
---|---|---|
IdentityDefinitionBase | identity1 | First instance to be compared. |
IdentityDefinitionBase | identity2 | Second instance to be compared. |
Returns
Type | Description |
---|---|
Boolean | True, if provided instances represent the same entity. False, otherwise. |
ToString()
Returns the current credentials display name.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String | The current credentials display name. |