nhujanen/aad-sso

Stand-alone Azure AD SSO library

Maintainers

Package info

github.com/wex/aad-sso

pkg:composer/nhujanen/aad-sso

Statistics

Installs: 10

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.1 2023-07-21 12:26 UTC

This package is auto-updated.

Last update: 2026-02-21 17:59:00 UTC


README

Simple stand-alone library to handle Azure AD SSO flow.

  • Tested with PHP 5.6 - 8.1
  • allow_url_fopen must be true in php.ini to use HTTP requests.
  • Requires ext-openssl.

License

MIT License

Install

You can use Composer:

composer require nhujanen/aad-sso

Example

See test/ for code examples.

You can run example with PHP's built-in web server:

foo@bar test]$ AAD_TENANT=foobar.com AAD_ID=00000000-0000-0000-0000-000000000000 AAD_SECRET=foo php -S localhost:8080 -t .

Remember: you need to add http://localhost:8080/auth.php as valid Redirect URI.

Create and configure AAD application

Refer to Register an application with the Microsoft identity platform.