Overview

Namespaces

  • Composer
    • Autoload
  • Geekwright
    • RegDom
  • League
    • OAuth2
      • Client
        • Provider
  • None
  • Xmf
    • Database
    • Jwt
    • Key
    • Module
      • Helper

Classes

  • JsonWebToken
  • KeyFactory
  • TokenFactory
  • TokenReader
  • Overview
  • Namespace
  • Class
  • Tree

Class TokenFactory

Build a token

Namespace: Xmf\Jwt
Package: Xmf
Category: Xmf\Jwt\TokenFactory
Copyright: 2016 XOOPS Project (http://xoops.org)
License: GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
Author: Richard Griffith richard@geekwright.com
Link: http://xoops.org
Located at lass/libraries/vendor/xoops/xmf/src/Xmf/Jwt/TokenFactory.php
Methods summary
public static string
# build( string $keyName, array|Traversable $payload, integer $expirationOffset = 0 )

Create a JSON Web Token string

Create a JSON Web Token string

Parameters

$keyName
name of the key to use to sign the token
$payload
traversable set of claims, claim => value
$expirationOffset

seconds from now that token will expire. If not specified, an "exp" claim will not be added or updated

Returns

string
a token string returned from JsonWebToken::create()

Throws

DomainException;
InvalidArgumentException;
UnexpectedValueException;
API documentation generated by ApiGen