Download the PHP package sensiolabs/connect-bundle without Composer

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

symfony/connect-bundle

About

This is the official bundle of the SymfonyConnect SDK.

Installation

Step 1: Install symfony/connect-bundle using Composer

If you're not using Symfony Flex, please take inspiration from this bundle's recipe to enable it.

Step 2: Configure your .env.local file

Usage

Use SymfonyConnect to authenticate your user

Step 1: Configure the security

Note: If you want to persist your users, read the Cookbooks section.

If you don't want to persist your users, you can use ConnectInMemoryUserProvider:

You can also load specific roles for some users:

Note: The username is the user uuid.

Step 2: Add some link to your templates

You can generate a link to the SymfonyConnect login page:

You can also specify the target URL after connection:

Step 3: Play with the user

The API user is available through the token storage, which you can get by autowiring Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface $tokenStorage.

If you use the built-in security component, you can access to the root api directly by autowiring SymfonyCorp\Connect\Api\Api $api:

You can also get access to the API root object by providing an access token explicitly:

Step 4: Handling Failures

Several errors can occur during the OAuth dance, for example the user can deny your application or the scope you defined in symfony_connect.yaml can be different from what you selected while creating your application on SymfonyConnect. Theses failures arehandled by the default Symfony failure handling.

Therefore, if an error occurred, the error is stored in the session (with a fallback on query attributes) and the user is redirected to the route/path specificed in failure_path node of the symfony_connect section of your firewall in security.yaml.

Warning: You need to specifiy failure_path. If you don't, the user will be redirected back to login_path, meaning that will launch the SymfonyConnect authentication and redirect the user to SymfonyConnect which can lead to a redirection loop.

This means you need to fetch the authentication error if there is one and display it in the view. This is similar to what you do for a typical login form on Symfony (here we assume you have a home route pointing to the following controller):

And then adapt your twig template:

Cookbooks

How to persist users

Step 1 - Create a User entity

Step 2 - Create the repository

Don't forget to update your database.

Step 3 - Create the event listener

Step 4 - Configure security

Step 5 - Enjoy

You can store more things if you want. But don't forget to update your application scope.

License

This bundle is licensed under the MIT license.


All versions of connect-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.3
symfonycorp/connect Version ^6.3
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 sensiolabs/connect-bundle contains the following files

Loading the files please wait ....