refactor(Abstractions.Security): Unnötige public Schlüsselwörter in Schnittstellen entfernt.

This commit is contained in:
Developer 02 2025-01-09 22:27:33 +01:00
parent 21e164ceb7
commit 5981ba7a8d
6 changed files with 14 additions and 14 deletions

View File

@ -2,6 +2,6 @@
{ {
public interface IAsymmetricEncryptor : IAsymmetricPublicKey public interface IAsymmetricEncryptor : IAsymmetricPublicKey
{ {
public byte[] Encrypt(byte[] data); byte[] Encrypt(byte[] data);
} }
} }

View File

@ -5,6 +5,6 @@ namespace DigitalData.Core.Abstractions.Security
{ {
public interface IAsymmetricKey : IUniqueSecurityContext public interface IAsymmetricKey : IUniqueSecurityContext
{ {
public string Content { get; } string Content { get; }
} }
} }

View File

@ -18,6 +18,6 @@ namespace DigitalData.Core.Abstractions.Security
int? keySizeInBits = null, int? keySizeInBits = null,
string? password = null); string? password = null);
public IAsymmetricDecryptor CreateDecryptor(string pem, string? issuer = null, string? audience = null, bool encrypt = false, RSAEncryptionPadding? padding = null); IAsymmetricDecryptor CreateDecryptor(string pem, string? issuer = null, string? audience = null, bool encrypt = false, RSAEncryptionPadding? padding = null);
} }
} }

View File

@ -4,7 +4,7 @@ namespace DigitalData.Core.Abstractions.Security
{ {
public interface IAsymmetricPrivateKey : IAsymmetricKey public interface IAsymmetricPrivateKey : IAsymmetricKey
{ {
public bool IsEncrypted { get; } bool IsEncrypted { get; }
IAsymmetricPublicKey PublicKey { get; } IAsymmetricPublicKey PublicKey { get; }
} }

View File

@ -13,27 +13,27 @@ namespace DigitalData.Core.Abstractions.Security
/// <summary> /// <summary>
/// Defines the compression algorithm that will be used to compress the JWT token payload. /// Defines the compression algorithm that will be used to compress the JWT token payload.
/// </summary> /// </summary>
public string CompressionAlgorithm { get; } string CompressionAlgorithm { get; }
/// <summary> /// <summary>
/// Gets or sets the <see cref="EncryptingCredentials"/> used to create a encrypted security token. /// Gets or sets the <see cref="EncryptingCredentials"/> used to create a encrypted security token.
/// </summary> /// </summary>
public EncryptingCredentials EncryptingCredentials { get; } EncryptingCredentials EncryptingCredentials { get; }
/// <summary> /// <summary>
/// Gets or sets the value of the 'expiration' claim. This value should be in UTC. /// Gets or sets the value of the 'expiration' claim. This value should be in UTC.
/// </summary> /// </summary>
public DateTime? Expires { get; } DateTime? Expires { get; }
/// <summary> /// <summary>
/// Gets or sets the time the security token was issued. This value should be in UTC. /// Gets or sets the time the security token was issued. This value should be in UTC.
/// </summary> /// </summary>
public DateTime? IssuedAt { get; } DateTime? IssuedAt { get; }
/// <summary> /// <summary>
/// Gets or sets the notbefore time for the security token. This value should be in UTC. /// Gets or sets the notbefore time for the security token. This value should be in UTC.
/// </summary> /// </summary>
public DateTime? NotBefore { get; } DateTime? NotBefore { get; }
/// <summary> /// <summary>
/// Gets or sets the token type. /// Gets or sets the token type.
@ -41,7 +41,7 @@ namespace DigitalData.Core.Abstractions.Security
/// If <see cref="AdditionalHeaderClaims"/> also contains 'typ' header claim value, it will override the TokenType provided here. /// If <see cref="AdditionalHeaderClaims"/> also contains 'typ' header claim value, it will override the TokenType provided here.
/// This value is used only for JWT tokens and not for SAML/SAML2 tokens</remarks> /// This value is used only for JWT tokens and not for SAML/SAML2 tokens</remarks>
/// </summary> /// </summary>
public string TokenType { get; } string TokenType { get; }
/// <summary> /// <summary>
/// Gets or sets the <see cref="Dictionary{TKey, TValue}"/> which contains any custom header claims that need to be added to the JWT token header. /// Gets or sets the <see cref="Dictionary{TKey, TValue}"/> which contains any custom header claims that need to be added to the JWT token header.
@ -50,7 +50,7 @@ namespace DigitalData.Core.Abstractions.Security
/// will result in an exception being thrown. /// will result in an exception being thrown.
/// <remarks> These claims are only added to the outer header (in case of a JWE).</remarks> /// <remarks> These claims are only added to the outer header (in case of a JWE).</remarks>
/// </summary> /// </summary>
public IDictionary<string, object> AdditionalHeaderClaims { get; } IDictionary<string, object> AdditionalHeaderClaims { get; }
/// <summary> /// <summary>
/// Gets or sets the <see cref="Dictionary{TKey, TValue}"/> which contains any custom header claims that need to be added to the inner JWT token header. /// Gets or sets the <see cref="Dictionary{TKey, TValue}"/> which contains any custom header claims that need to be added to the inner JWT token header.
@ -61,12 +61,12 @@ namespace DigitalData.Core.Abstractions.Security
/// For JsonWebTokenHandler, these claims are merged with <see cref="AdditionalHeaderClaims"/> while adding to the inner JWT header. /// For JsonWebTokenHandler, these claims are merged with <see cref="AdditionalHeaderClaims"/> while adding to the inner JWT header.
/// </remarks> /// </remarks>
/// </summary> /// </summary>
public IDictionary<string, object> AdditionalInnerHeaderClaims { get; } IDictionary<string, object> AdditionalInnerHeaderClaims { get; }
/// <summary> /// <summary>
/// Gets or sets the <see cref="SigningCredentials"/> used to create a security token. /// Gets or sets the <see cref="SigningCredentials"/> used to create a security token.
/// </summary> /// </summary>
public SigningCredentials SigningCredentials { get; } SigningCredentials SigningCredentials { get; }
#endregion SecurityTokenDescriptor #endregion SecurityTokenDescriptor
} }
} }

View File

@ -6,6 +6,6 @@
IAsymmetricDecryptor VaultDecryptor { get; } IAsymmetricDecryptor VaultDecryptor { get; }
public IEnumerable<IAsymmetricTokenDescriptor> TokenDescriptors { get; } IEnumerable<IAsymmetricTokenDescriptor> TokenDescriptors { get; }
} }
} }