<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

declare(strict_types=1);

namespace Magento\Framework\Jwt\Jwe;

use Magento\Framework\Jwt\HeaderInterface;
use Magento\Framework\Jwt\JwtInterface;

/**
 * JWE.
 */
interface JweInterface extends JwtInterface
{
    /**
     * Protected header.
     *
     * Same as "getHeader" for compact serialization.
     *
     * @return HeaderInterface
     */
    public function getProtectedHeader(): HeaderInterface;

    /**
     * Unprotected header can be present when JSON serialization is employed.
     *
     * @return HeaderInterface|null
     */
    public function getSharedUnprotectedHeader(): ?HeaderInterface;

    /**
     * Can be present when JSON serialization is used.
     *
     * @return HeaderInterface[]
     */
    public function getPerRecipientUnprotectedHeaders(): ?array;
}
