LaLiga-BackEnd/vendor/lexik/jwt-authentication-bundle/Services/KeyLoader/KeyLoaderInterface.php

34 lines
719 B
PHP

<?php
namespace Lexik\Bundle\JWTAuthenticationBundle\Services\KeyLoader;
/**
* Interface for classes that are able to load crypto keys.
*
* @author Robin Chalas <robin.chalas@gmail.com>
*
* @method string|null getPublicKey()
* @method string|null getSigningKey()
* @method array getAdditionalPublicKeys()
*/
interface KeyLoaderInterface
{
public const TYPE_PUBLIC = 'public';
public const TYPE_PRIVATE = 'private';
/**
* Loads a key from a given type (public or private).
*
* @param resource|string|null $type
*
* @return resource|string|null
*/
public function loadKey($type);
/**
* @return string|null
*/
public function getPassphrase();
}