Show / Hide Table of Contents

Class X509Attributes

Inheritance
Object
X509Attributes
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: Lacuna.Pki
Assembly: Lacuna.Pki.dll
Syntax
public class X509Attributes

Properties

Item[String]

Declaration
public X509Attribute this[string oid] { get; }
Parameters
Type Name Description
String oid
Property Value
Type Description
X509Attribute

Methods

Get(String, Boolean)

Declaration
public X509Attribute Get(string oid, bool throwOnNotFound = true)
Parameters
Type Name Description
String oid
Boolean throwOnNotFound
Returns
Type Description
X509Attribute

GetAccessIdentities()

Returns a list of Access Identity attribute (RFC 5755 item 4.4.2) values found on this collection of attributes, or an empty list if no AccessIdentity attribute is present.

Declaration
public List<AccessIdentityAttribute> GetAccessIdentities()
Returns
Type Description
List<AccessIdentityAttribute>
Remarks

This method will throw a FormatException if a malformed attribute is found. To avoid this, use the TryGetAccessIdentities() method instead.

GetAndDecodeValueAs<T>(String, Boolean)

Declaration
public T GetAndDecodeValueAs<T>(string oid, bool throwOnNotFound = true)
Parameters
Type Name Description
String oid
Boolean throwOnNotFound
Returns
Type Description
T
Type Parameters
Name Description
T

GetAndDecodeValuesAs<T>(String, Boolean)

Declaration
public List<T> GetAndDecodeValuesAs<T>(string oid, bool throwOnNotFound = true)
Parameters
Type Name Description
String oid
Boolean throwOnNotFound
Returns
Type Description
List<T>
Type Parameters
Name Description
T

GetAuthenticationInfos()

Returns a list of Service Authentication Information attribute (RFC 5755 item 4.4.1) values found on this collection of attributes, or an empty list if no Service Authentication Information attribute is present.

Declaration
public List<AuthenticationInfoAttribute> GetAuthenticationInfos()
Returns
Type Description
List<AuthenticationInfoAttribute>
Remarks

This method will throw a FormatException if a malformed attribute is found. To avoid this, use the TryGetAuthenticationInfos() method instead.

GetOids()

Declaration
public List<string> GetOids()
Returns
Type Description
List<String>

GetRole(Boolean)

Declaration
[Obsolete("Use methods GetRoles() or TryGetRoles() instead, since multiple roles may be present")]
public RoleAttribute GetRole(bool throwOnNotFound = true)
Parameters
Type Name Description
Boolean throwOnNotFound
Returns
Type Description
RoleAttribute

GetRoles()

Returns a list of Role attribute (RFC 5755 item 4.4.5) values found on this collection of attributes, or an empty list if no Role attribute is present.

Declaration
public List<RoleAttribute> GetRoles()
Returns
Type Description
List<RoleAttribute>
Remarks

This method will throw a FormatException if a malformed attribute is found. To avoid this, use the TryGetRoles() method instead.

GetRoles(Boolean)

Declaration
[Obsolete("Use methods GetRoles() or TryGetRoles() instead, which are more clear regarding exception handling")]
public List<RoleAttribute> GetRoles(bool throwOnNotFound)
Parameters
Type Name Description
Boolean throwOnNotFound
Returns
Type Description
List<RoleAttribute>

TryGetAccessIdentities(out List<AccessIdentityAttribute>)

Attempts to get a list of Access Identity attribute (RFC 5755 item 4.4.2) values found on this collection of attributes, if any.

Declaration
public bool TryGetAccessIdentities(out List<AccessIdentityAttribute> identities)
Parameters
Type Name Description
List<AccessIdentityAttribute> identities
Returns
Type Description
Boolean

true if at least one Access Identity attribute value was found and decoded successfuly, false otherwise.

Remarks

Attributes with an invalid encoding are silently ignored by this method. To avoid this, use the GetAccessIdentities() method instead.

TryGetAuthenticationInfos(out List<AuthenticationInfoAttribute>)

Attempts to get a list of Service Authentication Information attribute (RFC 5755 item 4.4.1) values found on this collection of attributes, if any.

Declaration
public bool TryGetAuthenticationInfos(out List<AuthenticationInfoAttribute> authInfos)
Parameters
Type Name Description
List<AuthenticationInfoAttribute> authInfos
Returns
Type Description
Boolean

true if at least one Service Authentication Information attribute value was found and decoded successfuly, false otherwise.

Remarks

Attributes with an invalid encoding are silently ignored by this method. To avoid this, use the GetAuthenticationInfos() method instead.

TryGetRoles(out List<RoleAttribute>)

Attempts to get a list of Role attribute (RFC 5755 item 4.4.5) values found on this collection of attributes, if any.

Declaration
public bool TryGetRoles(out List<RoleAttribute> roles)
Parameters
Type Name Description
List<RoleAttribute> roles
Returns
Type Description
Boolean

true if at least one Role attribute value was found and decoded successfuly, false otherwise.

Remarks

Attributes with an invalid encoding are silently ignored by this method. To avoid this, use the GetRoles() method instead.

Back to top Copyright © 2015-2020 Lacuna Software