<?php

declare(strict_types=1);

namespace App\Framework\Security\RequestSigning;

/**
 * Repository interface for managing signing keys
 */
interface SigningKeyRepository
{
    /**
     * Find a signing key by its ID
     */
    public function findByKeyId(string $keyId): ?SigningKey;

    /**
     * Store a signing key
     */
    public function store(SigningKey $key): void;

    /**
     * Remove a signing key
     */
    public function remove(string $keyId): void;

    /**
     * Get all active signing keys
     */
    public function getAllActive(): array;

    /**
     * Rotate keys (deactivate old, add new)
     */
    public function rotateKey(string $keyId, SigningKey $newKey): void;
}
