|
|
|
@ -189,6 +189,21 @@ public sealed class OpenIddictServerBuilder |
|
|
|
|
|
|
|
throw new InvalidOperationException(SR.GetResourceString(SR.ID0056)); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Registers multiple encryption keys.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="keys">The security keys.</param>
|
|
|
|
/// <returns>The <see cref="OpenIddictServerBuilder"/> instance.</returns>
|
|
|
|
public OpenIddictServerBuilder AddEncryptionKeys(IEnumerable<SecurityKey> keys) |
|
|
|
{ |
|
|
|
if (keys is null) |
|
|
|
{ |
|
|
|
throw new ArgumentNullException(nameof(keys)); |
|
|
|
} |
|
|
|
|
|
|
|
return keys.Aggregate(this, static (builder, key) => builder.AddEncryptionKey(key)); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Registers (and generates if necessary) a user-specific development encryption certificate.
|
|
|
|
@ -504,6 +519,21 @@ public sealed class OpenIddictServerBuilder |
|
|
|
.OfType<X509Certificate2>() |
|
|
|
.SingleOrDefault() ?? throw new InvalidOperationException(SR.GetResourceString(SR.ID0066))); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Registers multiple encryption certificates.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="certificates">The encryption certificates.</param>
|
|
|
|
/// <returns>The <see cref="OpenIddictServerBuilder"/> instance.</returns>
|
|
|
|
public OpenIddictServerBuilder AddEncryptionCertificates(IEnumerable<X509Certificate2> certificates) |
|
|
|
{ |
|
|
|
if (certificates is null) |
|
|
|
{ |
|
|
|
throw new ArgumentNullException(nameof(certificates)); |
|
|
|
} |
|
|
|
|
|
|
|
return certificates.Aggregate(this, static (builder, certificate) => builder.AddEncryptionCertificate(certificate)); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Registers signing credentials.
|
|
|
|
@ -576,6 +606,21 @@ public sealed class OpenIddictServerBuilder |
|
|
|
|
|
|
|
throw new InvalidOperationException(SR.GetResourceString(SR.ID0068)); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Registers multiple signing keys.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="keys">The signing keys.</param>
|
|
|
|
/// <returns>The <see cref="OpenIddictServerBuilder"/> instance.</returns>
|
|
|
|
public OpenIddictServerBuilder AddSigningKeys(IEnumerable<SecurityKey> keys) |
|
|
|
{ |
|
|
|
if (keys is null) |
|
|
|
{ |
|
|
|
throw new ArgumentNullException(nameof(keys)); |
|
|
|
} |
|
|
|
|
|
|
|
return keys.Aggregate(this, static (builder, key) => builder.AddSigningKey(key)); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Registers (and generates if necessary) a user-specific development signing certificate.
|
|
|
|
@ -920,6 +965,21 @@ public sealed class OpenIddictServerBuilder |
|
|
|
.OfType<X509Certificate2>() |
|
|
|
.SingleOrDefault() ?? throw new InvalidOperationException(SR.GetResourceString(SR.ID0066))); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Registers multiple signing certificates.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="certificates">The signing certificates.</param>
|
|
|
|
/// <returns>The <see cref="OpenIddictServerBuilder"/> instance.</returns>
|
|
|
|
public OpenIddictServerBuilder AddSigningCertificates(IEnumerable<X509Certificate2> certificates) |
|
|
|
{ |
|
|
|
if (certificates is null) |
|
|
|
{ |
|
|
|
throw new ArgumentNullException(nameof(certificates)); |
|
|
|
} |
|
|
|
|
|
|
|
return certificates.Aggregate(this, static (builder, certificate) => builder.AddSigningCertificate(certificate)); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Enables authorization code flow support. For more information
|
|
|
|
|