Pular para o conteúdo principal

X509Attributes

Namespace: Lacuna.Pki
Assembly: Lacuna.Pki
Class

public class X509Attributes

Hierarquia: objectX509Attributes

Propriedades

this[string]

public X509Attribute this[string oid] { get; }

Parâmetros

NomeTipoDescrição
oidstring

Retorno

X509Attribute


Métodos

Get(string, bool)

public X509Attribute Get(string oid, bool throwOnNotFound = true)

Parâmetros

NomeTipoDescrição
oidstring
throwOnNotFoundbool

Retorno

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.

public List<AccessIdentityAttribute> GetAccessIdentities()

Retorno

List<AccessIdentityAttribute>

Comentários

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


GetAndDecodeValueAs<T>(string, bool)

public T GetAndDecodeValueAs<T>(string oid, bool throwOnNotFound = true)

Parâmetros

NomeTipoDescrição
oidstring
throwOnNotFoundbool

Parâmetros de tipo

NomeDescrição
T

Retorno

T


GetAndDecodeValuesAs<T>(string, bool)

public List<T> GetAndDecodeValuesAs<T>(string oid, bool throwOnNotFound = true)

Parâmetros

NomeTipoDescrição
oidstring
throwOnNotFoundbool

Parâmetros de tipo

NomeDescrição
T

Retorno

List<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.

public List<AuthenticationInfoAttribute> GetAuthenticationInfos()

Retorno

List<AuthenticationInfoAttribute>

Comentários

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


GetOids()

public List<string> GetOids()

Retorno

List<string>


GetRole(bool)

[Obsolete("Use methods GetRoles() or TryGetRoles() instead, since multiple roles may be present")]
public RoleAttribute GetRole(bool throwOnNotFound = true)

Parâmetros

NomeTipoDescrição
throwOnNotFoundbool

Retorno

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.

public List<RoleAttribute> GetRoles()

Retorno

List<RoleAttribute>

Comentários

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


GetRoles(bool)

[Obsolete("Use methods GetRoles() or TryGetRoles() instead, which are more clear regarding exception handling")]
public List<RoleAttribute> GetRoles(bool throwOnNotFound)

Parâmetros

NomeTipoDescrição
throwOnNotFoundbool

Retorno

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.

public bool TryGetAccessIdentities(out List<AccessIdentityAttribute> identities)

Parâmetros

NomeTipoDescrição
identitiesList<AccessIdentityAttribute>

Retorno

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

Comentários

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.

public bool TryGetAuthenticationInfos(out List<AuthenticationInfoAttribute> authInfos)

Parâmetros

NomeTipoDescrição
authInfosList<AuthenticationInfoAttribute>

Retorno

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

Comentários

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.

public bool TryGetRoles(out List<RoleAttribute> roles)

Parâmetros

NomeTipoDescrição
rolesList<RoleAttribute>

Retorno

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

Comentários

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


Membros herdados

ToString(), Equals(object), Equals(object, object), ReferenceEquals(object, object), GetHashCode(), GetType(), MemberwiseClone()