Download the PHP package simplesso/common-bundle without Composer

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

SimpleSSO CommonBundle

A bundle with common tools for the SimpleSSO server and for any Symfony client.

Installation

Add the bundle to your Symfony project with composer.

Configuration

The bundle provide several models that will help you to communicate with the SimpleSSO server. By default, the bundle do not declare any service. It let you choose the services you want. This documentation will show you the whole configuration. You can then adapt it to fit your needs.

The Guard Authenticator

The bundle provide a guard that will authenticate the user against the SimpleSSO server.

First, create the config/packages/simplesso_common.yaml file and put the following content:

As you can see, the services require that you set several environment variables. In development, you can add the following lines to your .env file.

Note that you can get the SimpleSSO server public key by opening https://auth.example.com/public-key in a browser or with curl. Securing public keys or the client id is not necessary. However, a real care must be taken with the client private key. The file containing the private key must be readable by the application.

Then, you'll need to configure your security.

The authentication routes

A fallback route must be configured. The SimpleSSO server will redirect the user to this route with an AuthToken. For now, you cannot choose the route you want: it must be /authenticate. A logout route must also be set. It can be whatever you want.

Tag the controller provided with the bundle.

Add an access control to your security configuration.

Add the route to the routing. Create the file config/routes/simplesso_common.yaml with the following content:

User and User provider

The way you store the users is completely up to you. You need to provide a user provider that will fetch the user using the id of the user. This mean you have to keep this id (which is an UUID) stored so you can fetch users authenticating.

If the user is not found by the user provider, a authentication.unknownUserAuthenticated event is thrown, giving you the possibility to create the user and return it to the authentication system (check SimpleSSO\CommoneBundle\Event\UserEvent). This is the last chance before making the authentication fail.

We provide some basic user provider, but it is recommended that you implement your own. Use them for inspiration.

A) The simple in memory user provider

Implementation in SimpleSSO\CommonBundle\Security\UserProvider\InMemory.

This simple user provider do not stores anything in a persistent way. It fetches the profile information from the SimpleSSO server API each time the user is authenticated.

To use this user provider, you need to register it as a service, and configure it in the security config:

By default, it will instantiate a SimpleSSO\CommonBundle\Security\UserProvider\InMemory\SimpleInMemoryUser object to stores the user's profile. The object is then serialized in session in the security token. You can configure another class that you implemented if needed. This class must implement SimpleSSO\CommonBundle\Security\UserProvider\SimpleSSOUserInterface.

B) A Doctrine based user provider

TODO.


All versions of common-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1.3
ramsey/uuid Version ^3.7
symfony/dependency-injection Version ^4.0
symfony/http-kernel Version ^4.0
symfony/security Version ^4.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 simplesso/common-bundle contains the following files

Loading the files please wait ....