Table of Contents

Class CertificateAuthentication

Namespace
NuvTools.Security.Certificate
Assembly
NuvTools.Security.dll

Result of validating a signed certificate challenge.

public sealed record CertificateAuthentication : IEquatable<CertificateAuthentication>
Inheritance
CertificateAuthentication
Implements
Inherited Members

Constructors

CertificateAuthentication(bool, CertificateSubject?, CertificateFailureType)

Result of validating a signed certificate challenge.

public CertificateAuthentication(bool Valid, CertificateSubject? Subject, CertificateFailureType Failure)

Parameters

Valid bool

Whether the provider confirmed possession of the private key and the certificate's trust chain.

Subject CertificateSubject

Who the certificate was issued to. Set only when Valid is true.

Failure CertificateFailureType

Why the authentication failed, or None.

Properties

Failure

Why the authentication failed, or None.

public CertificateFailureType Failure { get; init; }

Property Value

CertificateFailureType

Subject

Who the certificate was issued to. Set only when Valid is true.

public CertificateSubject? Subject { get; init; }

Property Value

CertificateSubject

Valid

Whether the provider confirmed possession of the private key and the certificate's trust chain.

public bool Valid { get; init; }

Property Value

bool

Methods

Failed(CertificateFailureType)

Creates the result of an authentication that did not go through.

public static CertificateAuthentication Failed(CertificateFailureType failure)

Parameters

failure CertificateFailureType

Why it failed.

Returns

CertificateAuthentication

Succeeded(CertificateSubject)

Creates the result of an authentication the provider accepted.

public static CertificateAuthentication Succeeded(CertificateSubject subject)

Parameters

subject CertificateSubject

Who the certificate was issued to.

Returns

CertificateAuthentication