Download the PHP package socialiteproviders/duo without Composer

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

Duo SSO

Installation & Basic Usage

Please see the Base Installation Guide, then follow the provider specific instructions below.

Prerequisites

Before you begin, you must have:

  1. Duo SSO configured - You need a Duo Premier, Advantage or Essentials plan with Single Sign-On enabled
  2. OIDC Application created in Duo Admin Panel:
    • Navigate to Applications -> Protect an Application
    • Select Generic OIDC Relying Party
    • Configure your application and obtain the Client ID and Client Secret
  3. Duo SSO subdomain - Your custom subdomain or the default one assigned to your account

Refer to the Duo SSO for OIDC documentation for detailed setup instructions.

Add configuration to config/services.php

Add environment variables

Add these to your .env file:

Note: For the DUO_DOMAIN, you can use either:

Add provider event listener

Laravel 11+

In Laravel 11, the default EventServiceProvider provider was removed. Instead, add the listener using the listen method on the Event facade, in your AppServiceProvider boot method.

Laravel 10 or below Configure the package's listener to listen for `SocialiteWasCalled` events. Add the event to your `listen[]` array in `app/Providers/EventServiceProvider`. See the [Base Installation Guide](https://socialiteproviders.com/usage/) for detailed instructions.

Configure OIDC Application in Duo Admin Panel

When creating your Generic OIDC Relying Party application in Duo:

  1. Navigate to Applications -> Application Catalog
  2. Search for "Generic OIDC Relying Party"
  3. Click Add to create the application
  4. Under Scopes & Claims, configure:
    • Enable openid scope (required - provides sub claim)
    • Enable profile scope (provides name, preferred_username, picture, etc.)
    • Enable email scope (provides email claim)
    • Map each claim to the appropriate attribute from your authentication source

About Claims: Duo SSO acts as a bridge between your authentication source (AD/SAML/Duo Directory) and your application. The claims sent to your application come from the attributes in your authentication source. For example:

For more information, see Duo's OIDC documentation.

Configure Redirect URI

In your Duo Admin Panel, add your callback URL to the OIDC application's allowed redirect URIs:

  1. Navigate to your OIDC application in the Duo Admin Panel
  2. Scroll to Client Flow Configuration -> Sign-In Redirect URLs
  3. Add: https://yourdomain.com/auth/duo/callback
  4. Click Save

Usage

You should now be able to use the provider like you would regularly use Socialite (assuming you have the facade installed):

Callback Example

Returned User fields

The provider maps standard OpenID Connect claims to Socialite user fields. With the default scopes (openid, profile, email):

Note: Duo SSO implements OpenID Connect and follows the OpenID Connect Core 1.0 specification for standard claims. The actual claims available depend on:

  1. Which scopes you request (openid, profile, email, etc.)
  2. The claim mappings configured in your Duo Admin Panel
  3. The attributes available from your authentication source (Active Directory, SAML IdP or Duo Directory)

Duo SSO passes through the attributes from your authentication source to the OIDC claims based on your application's configuration.

Optional: Custom Scopes

By default, the provider requests openid, profile and email scopes. You can customize these:

Available scopes depend on your Duo SSO OIDC application configuration in the Duo Admin Panel.

Testing Integration

To see exactly which claims your Duo SSO instance returns:

This will show you all available claims from Duo's UserInfo endpoint for your specific configuration.

Reference


All versions of duo with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-json Version *
socialiteproviders/manager Version ^4.8
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 socialiteproviders/duo contains the following files

Loading the files please wait ...