Download the PHP package hakkahio/laravel-azure-ad-oauth-laravel-8 without Composer

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

Laravel Socialite Azure Active Directory Plugin

Installation

composer require hakkahio/laravel-azure-ad-oauth-laravel-8

If you are using Laravel 5.5 or greater, the service provider will be detected and installed by Laravel automatically. Otherwise you will need to add the service provider and the facade (optional) to the config/app.php file:

Publish the config and override any defaults:

Add the necessary env vars:

The only changes you should have to make to your application are:

Usage

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 a user has been logged in, they will be redirect to the home page (also configurable).

After login, you can access the basic Laravel authenticate user as normal:

If you need to set additional user fields when the user model is created at login, you may provide a callback via the UserFactory::userCallback() method. A good place to do so would be in your AppServiceProvider's boot method:

Azure AD Setup

  1. Navigate to Azure Active Directory -> App registrations.
  2. Create a new application
    1. Choose a name
    2. Select the "Web app / API" Application Type
    3. Add the "Sign-on URL". This will typically be https://domain.com/auth/login
    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 "Reply URLs". 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 "Required 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 "Keys" tab, 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. Click on the "Managed application" link (It will be the name of the application);
  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.

All versions of laravel-azure-ad-oauth-laravel-8 with dependencies

PHP Build Version
Package Version
Requires laravel/framework Version >5.4
laravel/socialite Version >3.0
guzzlehttp/guzzle Version ^7.0.1
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 hakkahio/laravel-azure-ad-oauth-laravel-8 contains the following files

Loading the files please wait ....