Download the PHP package zhulei-nj/manager without Composer

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

manager

Easily add new or override built-in providers in Laravel Socialite

A package for Laravel Socialite that allows you to easily add new providers or override current providers.

Benefits

You will have access to all of the providers that you load in using the manager. Instantiation is deferred until Socialite is called You can override current providers You can create new providers Lumen usage is easy stateless() can be set to true or false You can override a config dynamically It retrieves environment variables directly from the .env file instead of also having to configure the services array. Available Providers

See the zhulei-nj list You can also make your own or modify someone else's Reference

Laravel docs about events Laracasts video on events in Laravel 5 Laravel Socialite Docs Laracasts Socialite video Creating a Handler

Below is an example handler. You need to add this full class name to the listen[] in the EventServiceProvider.

See also the Laravel docs about events. providername is the name of the provider such as meetup. You will need to change your the namespacing and class names of course. namespace Your\Name\Space;

use zhulei\Manager\SocialiteWasCalled;

class ProviderNameExtendSocialite { public function handle(SocialiteWasCalled $socialiteWasCalled) { $socialiteWasCalled->extendSocialite('providername', \Your\Name\Space\Provider::class); } } Creating a Provider

Look at the already created providers for inspiration. See this article on Medium Overriding a Built-in Provider

You can easily override a built-in laravel/socialite provider by creating a new one with exactly the same name (i.e. 'facebook').

Dynamically Passing a Config

You can dynamically pass a config by using:

$clientId = "secret"; $clientSecret = "secret"; $redirectUrl = "http://yourdomain.com/api/redirect"; $additionalProviderConfig = ['site' => 'meta.stackoverflow.com']; $config = new \zhulei\Manager\Config($clientId, $clientSecret, $redirectUrl, $additionalProviderConfig); return Socialite::with('provider-name')->setConfig($config)->redirect(); You must call this before you run any Socialite methods.

Creating an OAuth1 Server Class

Take a look at the other OAuth1 providers for inspiration.

Getting the Access Token Response Body

Laravel Socialite by default only allows access to the access_token. Which can be accessed via the \Laravel\Socialite\User->token public property. Sometimes you need access to the whole response body which may contain items such as a refresh_token.

To make this possible, the OAuth2 provider class needs to extend \zhulei\Manager\OAuth2\AbstractProvider and OAuth1 providers need to utilize the \zhulei\Manager\OAuth1\AbstractProvider and \zhulei\Manager\OAuth1\Server.

You can access it from the user object like so: $user->accessTokenResponseBody


All versions of manager with dependencies

PHP Build Version
Package Version
Requires php Version ^5.6 || ^7.0
laravel/socialite Version ~2.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 zhulei-nj/manager contains the following files

Loading the files please wait ....