Download the PHP package picios/tokenizer without Composer

On this page you can find all versions of the php package picios/tokenizer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package tokenizer

Tokenizer

This library helps to create and validate url valid tokens and store some data within it. Such token can not be changed, otherwise it's not valid anymore.

Installation

Install with composer

Usage

Creating a new token

You need to create the token first, to e.g. send it as a query parameter in en email message

Parsing the token

Incoming token must be validated by the TokenManager::parse() function

Creation time

You can easily check the token creation time to consider its expiration

How it works

The token allows you to store a limited amount of data in one string in a safe way.

To create a new token, you need to get TokenManager object with parameters SEED and a structure of the data in token. It's a simple array with names of the token data fields. The SEED and the structure must be the same during creating the token and when you parse it.

When the TokenManager object is set, you may call its createToken(array data) function, of which the only required parameter is the associeted array with the data, you want to store in the token. The data array must contain exactly the same fields, as in the structure from the TokenManager object.

The data in the token are explicit, just encoded with base64 algorythm. They can be easly decoded. For the above example token

a decoded string is

First 6 characters is a substring of a md5 hash created from all the data in the token plus the secret seed known only on the server side. The next 25 characters is a date of creating the token in ATOM format. The rest is the data encoded with the JSON format.

It's safety and unchangeability comes from the simple hash, that is a kind of a checksum of our token.

Troubleshooting

Testing

To test the class, run:

Homepage

You can read more at Picios.pl


All versions of tokenizer with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package picios/tokenizer contains the following files

Loading the files please wait ....