2026-03-16 19:15:04 +01:00
|
|
|
using System.Text.Json;
|
2026-08-18 07:40:24 +02:00
|
|
|
using IdentityShroud.Core.Model;
|
2026-03-16 19:15:04 +01:00
|
|
|
|
|
|
|
|
namespace IdentityShroud.Core;
|
|
|
|
|
|
2026-08-18 07:40:24 +02:00
|
|
|
public interface IJwtSigner
|
2026-03-16 19:15:04 +01:00
|
|
|
{
|
|
|
|
|
/*
|
|
|
|
|
Of the signature and MAC algorithms specified in JSON Web Algorithms
|
|
|
|
|
[JWA], only HMAC SHA-256 ("HS256") and "none" MUST be implemented by
|
|
|
|
|
conforming JWT implementations. It is RECOMMENDED that
|
|
|
|
|
implementations also support RSASSA-PKCS1-v1_5 with the SHA-256 hash
|
|
|
|
|
algorithm ("RS256") and ECDSA using the P-256 curve and the SHA-256
|
|
|
|
|
hash algorithm ("ES256"). Support for other algorithms and key sizes
|
|
|
|
|
is OPTIONAL.
|
|
|
|
|
*/
|
2026-08-18 07:40:24 +02:00
|
|
|
IReadOnlyList<JwtSigAlgName> Algorithms { get; }
|
2026-03-16 19:15:04 +01:00
|
|
|
|
2026-08-18 07:40:24 +02:00
|
|
|
byte[] CalculateSignature(JwtSigAlgName algName, DecryptedSigningKey key, ReadOnlySpan<byte> jwt);
|
2026-03-16 19:15:04 +01:00
|
|
|
}
|