XMF Cookbook
  • Introduction
  • XMF Cookbook
  • Basic Ingredients
    • Namespaces
    • Autoloading
    • Debugging
    • Forward Compatibility
  • Recipes
    • Introducing Module Helpers
    • Using the Permission Helper
      • Checking Permissions
      • Managing Item Permissions
    • Using the Session Helper
    • Using JSON Web Tokens
    • Altering Database Tables
    • Migrating a Module's Database
    • Loading Initial Data
    • Module Admin Pages
      • Hide and Seek with Icons
      • Standard Admin Pages
    • Manage Metadata
    • Highlighting Content
  • Reference
    • Assert
      • Assertions
    • Database
      • Migrate
      • TableLoad
      • Tables
        • Getting Started
        • Table Operations
        • Working with Columns
        • Working with Indexes
        • Changing Table Data
        • Interacting with the Work Queue
        • Error Info and Debugging
    • Debug
    • FilterInput
    • Highlighter
    • IPAddress
    • Jwt
      • JsonWebToken
      • KeyFactory
      • TokenFactory
      • TokenReader
    • Key
      • ArrayStorage
      • Basic
      • FileStorage
      • KeyAbstract
      • StorageInterface
    • Language
    • Metagen
      • Extracting Data
      • Applying Data
    • Module
      • Admin
      • Helper
      • Helper
        • AbstractHelper
        • Cache
        • GenericHelper
        • Permission
        • Session
    • ProxyCheck
    • Random
    • Request
    • StopWords
    • Uuid
    • Yaml
  • Credits
  • License:
  • Table of Content
Powered by GitBook
On this page
  1. Reference
  2. Jwt

KeyFactory

PreviousJsonWebTokenNextTokenFactory

Last updated 7 years ago

The Xmf\Jwt\KeyFactory class is a factory used to build key objects for use in a object.

KeyFactory:build($keyName, $storage = null)

Returns a Xmf\Key\Basic key object for JWT use based on default choices. If the key, specified by name in $keyName, has not been established, it will be created.

The $keyName key name is a string, the symbolic name of the key to use. The $keyName uniquely identifies a key in a key store, as defined by the interface Xmf\Key\StorageInterface. The key name should relate to a specific application action, or a closely related set of actions.

If specified, $storage should be an instance of Xmf\Key\StorageInterface. If null a default instance will be used.

JsonWebToken
FileStorage