Download the PHP package dasprid/helios without Composer

On this page you can find all versions of the php package dasprid/helios. 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 helios

Helios

Build Status Coverage Status Dependency Status Reference Status Latest Stable Version Total Downloads License

Helios is an authentication middleware embracing PSR-7. It's purpose is to keep the identity completely request dependent, as well as avoiding the use of server-side session through the use of JSON Web Tokens.

Installation

Install via composer:

Getting started (for Expressive)

JWT cookies

This library uses Pikkuleipa, a cookie manager utilizing JSON Web Tokens. In order to start working with Helios, you need to configure Pikkuleipa first.

Import the factory config

Create a file named helios.global.php or similar in your autoloading config directory:

This will introduce a few factories, namely you can retrieve the following objects through that:

Create an identity lookup

You'll need to implement a lookup which retrieves the user identity based on the subject stored in the token. Register that lookup in your dependency container:

Then wire your implementation to Helios by updating configuration file:

Configure Helios

For Helios to function, it needs a few configuration variables. Copy the file doc/example-config.php and adjust the values as needed.

Register the identity middleware

Helios ships with an IdentityMiddleware, which should be registered in your middleware pipeline before the dispatch middleware. The exact location in the stack depends on your own needs.

Write your sign-in middleware

Helios itself does not ship with any actual logic for signing users in or out. Thus, a simple sign-in middleware may look like this:

Write your sign-out middleware

Similar to the sign-in middleware, your sign-out middleware can use the IdentityCookieManager to invalidate the cookie:

Retrieve the user identity in a middleware

Each time the user is retrieved by the IdentityMiddleware, it is injected into the request as an attribute. Thus when you need the user in your middleware, you can easily get it:

Sometimes it may be required that the identity is always available in your view, e.g. to display the username in the layout. The proper way to handle that case is to use a specific template renderer which takes the request object, beside the usual view parameters, and injects the user into the view variables before rendering. Try to avoid injecting the entire request object into the view parameters though.


All versions of helios with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1
psr/http-message Version ^1.0
dasprid/treereader Version ^1.1
dasprid/pikkuleipa Version ^2.0
cultuurnet/clock Version ^1.0
psr/http-server-middleware Version ^1.0
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 dasprid/helios contains the following files

Loading the files please wait ....