Download the PHP package caredfor/socialite-azure-oauth without Composer

On this page you can find all versions of the php package caredfor/socialite-azure-oauth. 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 socialite-azure-oauth

Laravel Socialite Azure Active Directory Plugin

Inspired by metrogistics/laravel-azure-ad-oauth and updated to allow multi azure connection and better override.

Installation

Publish the config and override any defaults:

Add the necessary env vars following what defined in your config file. By default :

Usage

Create a controller and import the trait AzureOAuthControllerTrait. It'll provide you method for socialite oAuth. Then add your controller namespace in config file for key auth_controller

After the setup of your Azure AD (see below), all you need to do to make use of Azure AD SSO is to point a user to the /login/microsoft route (configurable) for login.

Once logged, user will be redirected and will trigger the method handleOAuthUser() of your own controller.

Azure AD Setup

  1. Navigate to Azure Active Directory -> App registrations.
  2. Create a new application
    1. Choose a name
    2. Select the wanted value for supported account types (it's up to you)
    3. On platform configuration, select "Client Application (Web, iOS, Android, Desktop+Devices)"
    4. Click "Create"
  3. Click into the newly created app.
  4. The "Application ID" is what you will need for your AZURE_AD_CLIENT_ID env variable.
  5. Click into "Redirect URIs". You will need to whitelist the redirection path for your app here. It will typically be https://domain.com/login/microsoft/callback. Click "Save"
  6. Select the permissions required for you app in the "Api permissions" tab.
  7. Add any necessary roles to the manifest:

    1. Click on the "Manifest" tab.
    2. Add roles as necessary using the following format:

    3. Click "Save"
  8. In the "Certificates & secrets" tab, click on "new client secret" enter a description (something like "App Secret"). Set Duration to "Never Expires". Click "Save". Copy the whole key. This will not show again. You will need this value for the AZURE_AD_CLIENT_SECRET env variable.
  9. Go back in Azure active directory and click on the "Entreprise application" link. Then click on the application name
  10. Under the "Properties" tab, enable user sign-in. Make user assignment required. Click "Save".
  11. Under the "Users and groups" tab, add users and their roles as needed.
  12. Extra: configure published domain to make your app verified : https://docs.microsoft.com/fr-be/azure/active-directory/develop/howto-configure-publisher-domain#configure-publisher-domain-using-the-azure-portal

All versions of socialite-azure-oauth with dependencies

PHP Build Version
Package Version
Requires laravel/socialite Version ^5.0
laravel/framework Version >5.5
guzzlehttp/guzzle 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 caredfor/socialite-azure-oauth contains the following files

Loading the files please wait ....