| 1 | <?php |
||
| 25 | class TokenFactory |
||
| 26 | { |
||
| 27 | /** |
||
| 28 | * Create a JSON Web Token string |
||
| 29 | * |
||
| 30 | * @param string $keyName name of the key to use to sign the token |
||
| 31 | * @param array|Traversable $payload traversable set of claims, claim => value |
||
| 32 | * @param int $expirationOffset seconds from now that token will expire. If not specified, |
||
| 33 | * an "exp" claim will not be added or updated |
||
| 34 | * |
||
| 35 | * @return string a token string returned from JsonWebToken::create() |
||
| 36 | * |
||
| 37 | * @throws \DomainException; |
||
| 38 | * @throws \InvalidArgumentException; |
||
| 39 | * @throws \UnexpectedValueException; |
||
| 40 | */ |
||
| 41 | 1 | public static function build($keyName, $payload, $expirationOffset = 0) |
|
| 46 | } |
||
| 47 |