From 5981ba7a8d6e5a37eea41fdf0d2d90814a34d936 Mon Sep 17 00:00:00 2001 From: Developer 02 Date: Thu, 9 Jan 2025 22:27:33 +0100 Subject: [PATCH] =?UTF-8?q?refactor(Abstractions.Security):=20Unn=C3=B6tig?= =?UTF-8?q?e=20public=20Schl=C3=BCsselw=C3=B6rter=20in=20Schnittstellen=20?= =?UTF-8?q?entfernt.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Security/IAsymmetricEncryptor.cs | 2 +- .../Security/IAsymmetricKey.cs | 2 +- .../Security/IAsymmetricKeyFactory.cs | 2 +- .../Security/IAsymmetricPrivateKey.cs | 2 +- .../Security/IAsymmetricTokenDescriptor.cs | 18 +++++++++--------- .../Security/ICryptoFactory.cs | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/DigitalData.Core.Abstractions/Security/IAsymmetricEncryptor.cs b/DigitalData.Core.Abstractions/Security/IAsymmetricEncryptor.cs index 4074982..c94539a 100644 --- a/DigitalData.Core.Abstractions/Security/IAsymmetricEncryptor.cs +++ b/DigitalData.Core.Abstractions/Security/IAsymmetricEncryptor.cs @@ -2,6 +2,6 @@ { public interface IAsymmetricEncryptor : IAsymmetricPublicKey { - public byte[] Encrypt(byte[] data); + byte[] Encrypt(byte[] data); } } \ No newline at end of file diff --git a/DigitalData.Core.Abstractions/Security/IAsymmetricKey.cs b/DigitalData.Core.Abstractions/Security/IAsymmetricKey.cs index 9d54700..d426aeb 100644 --- a/DigitalData.Core.Abstractions/Security/IAsymmetricKey.cs +++ b/DigitalData.Core.Abstractions/Security/IAsymmetricKey.cs @@ -5,6 +5,6 @@ namespace DigitalData.Core.Abstractions.Security { public interface IAsymmetricKey : IUniqueSecurityContext { - public string Content { get; } + string Content { get; } } } \ No newline at end of file diff --git a/DigitalData.Core.Abstractions/Security/IAsymmetricKeyFactory.cs b/DigitalData.Core.Abstractions/Security/IAsymmetricKeyFactory.cs index b52d2f5..76caa12 100644 --- a/DigitalData.Core.Abstractions/Security/IAsymmetricKeyFactory.cs +++ b/DigitalData.Core.Abstractions/Security/IAsymmetricKeyFactory.cs @@ -18,6 +18,6 @@ namespace DigitalData.Core.Abstractions.Security int? keySizeInBits = 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); } } \ No newline at end of file diff --git a/DigitalData.Core.Abstractions/Security/IAsymmetricPrivateKey.cs b/DigitalData.Core.Abstractions/Security/IAsymmetricPrivateKey.cs index 36e8356..63e31e8 100644 --- a/DigitalData.Core.Abstractions/Security/IAsymmetricPrivateKey.cs +++ b/DigitalData.Core.Abstractions/Security/IAsymmetricPrivateKey.cs @@ -4,7 +4,7 @@ namespace DigitalData.Core.Abstractions.Security { public interface IAsymmetricPrivateKey : IAsymmetricKey { - public bool IsEncrypted { get; } + bool IsEncrypted { get; } IAsymmetricPublicKey PublicKey { get; } } diff --git a/DigitalData.Core.Abstractions/Security/IAsymmetricTokenDescriptor.cs b/DigitalData.Core.Abstractions/Security/IAsymmetricTokenDescriptor.cs index ae409b0..aabcf8a 100644 --- a/DigitalData.Core.Abstractions/Security/IAsymmetricTokenDescriptor.cs +++ b/DigitalData.Core.Abstractions/Security/IAsymmetricTokenDescriptor.cs @@ -13,27 +13,27 @@ namespace DigitalData.Core.Abstractions.Security /// /// Defines the compression algorithm that will be used to compress the JWT token payload. /// - public string CompressionAlgorithm { get; } + string CompressionAlgorithm { get; } /// /// Gets or sets the used to create a encrypted security token. /// - public EncryptingCredentials EncryptingCredentials { get; } + EncryptingCredentials EncryptingCredentials { get; } /// /// Gets or sets the value of the 'expiration' claim. This value should be in UTC. /// - public DateTime? Expires { get; } + DateTime? Expires { get; } /// /// Gets or sets the time the security token was issued. This value should be in UTC. /// - public DateTime? IssuedAt { get; } + DateTime? IssuedAt { get; } /// /// Gets or sets the notbefore time for the security token. This value should be in UTC. /// - public DateTime? NotBefore { get; } + DateTime? NotBefore { get; } /// /// Gets or sets the token type. @@ -41,7 +41,7 @@ namespace DigitalData.Core.Abstractions.Security /// If 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 /// - public string TokenType { get; } + string TokenType { get; } /// /// Gets or sets the 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. /// These claims are only added to the outer header (in case of a JWE). /// - public IDictionary AdditionalHeaderClaims { get; } + IDictionary AdditionalHeaderClaims { get; } /// /// Gets or sets the 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 while adding to the inner JWT header. /// /// - public IDictionary AdditionalInnerHeaderClaims { get; } + IDictionary AdditionalInnerHeaderClaims { get; } /// /// Gets or sets the used to create a security token. /// - public SigningCredentials SigningCredentials { get; } + SigningCredentials SigningCredentials { get; } #endregion SecurityTokenDescriptor } } \ No newline at end of file diff --git a/DigitalData.Core.Abstractions/Security/ICryptoFactory.cs b/DigitalData.Core.Abstractions/Security/ICryptoFactory.cs index 09316a1..180d8d6 100644 --- a/DigitalData.Core.Abstractions/Security/ICryptoFactory.cs +++ b/DigitalData.Core.Abstractions/Security/ICryptoFactory.cs @@ -6,6 +6,6 @@ IAsymmetricDecryptor VaultDecryptor { get; } - public IEnumerable TokenDescriptors { get; } + IEnumerable TokenDescriptors { get; } } } \ No newline at end of file