[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * This file is part of Lcobucci\JWT, a simple library to handle JWT and JWS 4 * 5 * @license http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause 6 */ 7 8 namespace Lcobucci\JWT; 9 10 use InvalidArgumentException; 11 use Lcobucci\JWT\Signer\Key; 12 13 /** 14 * Basic interface for token signers 15 * 16 * @author Luís Otávio Cobucci Oblonczyk <[email protected]> 17 * @since 0.1.0 18 */ 19 interface Signer 20 { 21 /** 22 * Returns the algorithm id 23 * 24 * @return string 25 */ 26 public function getAlgorithmId(); 27 28 /** 29 * Apply changes on headers according with algorithm 30 * 31 * @param array $headers 32 */ 33 public function modifyHeader(array &$headers); 34 35 /** 36 * Returns a signature for given data 37 * 38 * @param string $payload 39 * @param Key|string $key 40 * 41 * @return Signature 42 * 43 * @throws InvalidArgumentException When given key is invalid 44 */ 45 public function sign($payload, $key); 46 47 /** 48 * Returns if the expected hash matches with the data and key 49 * 50 * @param string $expected 51 * @param string $payload 52 * @param Key|string $key 53 * 54 * @return boolean 55 * 56 * @throws InvalidArgumentException When given key is invalid 57 */ 58 public function verify($expected, $payload, $key); 59 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |