-
Notifications
You must be signed in to change notification settings - Fork 9.9k
/
CertificateValidatedContext.cs
33 lines (30 loc) · 1.31 KB
/
CertificateValidatedContext.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Security.Cryptography.X509Certificates;
using Microsoft.AspNetCore.Http;
namespace Microsoft.AspNetCore.Authentication.Certificate
{
/// <summary>
/// Context used when certificates are being validated.
/// </summary>
public class CertificateValidatedContext : ResultContext<CertificateAuthenticationOptions>
{
/// <summary>
/// Creates a new instance of <see cref="CertificateValidatedContext"/>.
/// </summary>
/// <param name="context">The HttpContext the validate context applies too.</param>
/// <param name="scheme">The scheme used when the Certificate Authentication handler was registered.</param>
/// <param name="options">The <see cref="CertificateAuthenticationOptions"/>.</param>
public CertificateValidatedContext(
HttpContext context,
AuthenticationScheme scheme,
CertificateAuthenticationOptions options)
: base(context, scheme, options)
{
}
/// <summary>
/// The certificate to validate.
/// </summary>
public X509Certificate2 ClientCertificate { get; set; }
}
}