Updated AzureAD provider to use microsoft graph

Since AzureAD graph is going away.
Tested using old AzureAD graph usage for backwards-compatbility, did not
seem to break things. Could not test with conditional access though due
to azure never enforcing it no matter what I attempted.

Fpr #3028
This commit is contained in:
Dan Brown 2021-10-31 13:08:01 +00:00
parent 85dc8d9791
commit 5c834f24a6
No known key found for this signature in database
GPG Key ID: 46D9F943C24A2EF9
3 changed files with 75 additions and 68 deletions

View File

@ -281,9 +281,6 @@ class SocialAuthService
if ($driverName === 'google' && config('services.google.select_account')) {
$driver->with(['prompt' => 'select_account']);
}
if ($driverName === 'azure') {
$driver->with(['resource' => 'https://graph.windows.net']);
}
if (isset($this->configureForRedirectCallbacks[$driverName])) {
$this->configureForRedirectCallbacks[$driverName]($driver);

View File

@ -33,7 +33,7 @@
"predis/predis": "^1.1.6",
"socialiteproviders/discord": "^4.1",
"socialiteproviders/gitlab": "^4.1",
"socialiteproviders/microsoft-azure": "^4.1",
"socialiteproviders/microsoft-azure": "^5.0.1",
"socialiteproviders/okta": "^4.1",
"socialiteproviders/slack": "^4.1",
"socialiteproviders/twitch": "^5.3",

138
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "fc6d8f731e3975127a9101802cc4bb3a",
"content-hash": "4780c46ffc4d1a09af810f62ca59e4a7",
"packages": [
{
"name": "aws/aws-crt-php",
@ -58,16 +58,16 @@
},
{
"name": "aws/aws-sdk-php",
"version": "3.199.3",
"version": "3.199.7",
"source": {
"type": "git",
"url": "https://github.com/aws/aws-sdk-php.git",
"reference": "132a1148ebb63d04023837bcf9a36f49b308a0bd"
"reference": "fda176884d2952cffc7e67209470bff49609339c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/132a1148ebb63d04023837bcf9a36f49b308a0bd",
"reference": "132a1148ebb63d04023837bcf9a36f49b308a0bd",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/fda176884d2952cffc7e67209470bff49609339c",
"reference": "fda176884d2952cffc7e67209470bff49609339c",
"shasum": ""
},
"require": {
@ -143,9 +143,9 @@
"support": {
"forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
"issues": "https://github.com/aws/aws-sdk-php/issues",
"source": "https://github.com/aws/aws-sdk-php/tree/3.199.3"
"source": "https://github.com/aws/aws-sdk-php/tree/3.199.7"
},
"time": "2021-10-25T18:17:28+00:00"
"time": "2021-10-29T18:25:02+00:00"
},
{
"name": "bacon/bacon-qr-code",
@ -3297,16 +3297,16 @@
},
{
"name": "phpseclib/phpseclib",
"version": "3.0.10",
"version": "3.0.11",
"source": {
"type": "git",
"url": "https://github.com/phpseclib/phpseclib.git",
"reference": "62fcc5a94ac83b1506f52d7558d828617fac9187"
"reference": "6e794226a35159eb06f355efe59a0075a16551dd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/62fcc5a94ac83b1506f52d7558d828617fac9187",
"reference": "62fcc5a94ac83b1506f52d7558d828617fac9187",
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/6e794226a35159eb06f355efe59a0075a16551dd",
"reference": "6e794226a35159eb06f355efe59a0075a16551dd",
"shasum": ""
},
"require": {
@ -3388,7 +3388,7 @@
],
"support": {
"issues": "https://github.com/phpseclib/phpseclib/issues",
"source": "https://github.com/phpseclib/phpseclib/tree/3.0.10"
"source": "https://github.com/phpseclib/phpseclib/tree/3.0.11"
},
"funding": [
{
@ -3404,7 +3404,7 @@
"type": "tidelift"
}
],
"time": "2021-08-16T04:24:45+00:00"
"time": "2021-10-27T03:01:46+00:00"
},
{
"name": "pragmarx/google2fa",
@ -4224,16 +4224,16 @@
},
{
"name": "socialiteproviders/microsoft-azure",
"version": "4.2.1",
"version": "5.0.1",
"source": {
"type": "git",
"url": "https://github.com/SocialiteProviders/Microsoft-Azure.git",
"reference": "64779ec21db0bee3111039a67c0fa0ab550a3462"
"reference": "9b23e02ff711de42e513aa55f768a4f1c67c0e41"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/SocialiteProviders/Microsoft-Azure/zipball/64779ec21db0bee3111039a67c0fa0ab550a3462",
"reference": "64779ec21db0bee3111039a67c0fa0ab550a3462",
"url": "https://api.github.com/repos/SocialiteProviders/Microsoft-Azure/zipball/9b23e02ff711de42e513aa55f768a4f1c67c0e41",
"reference": "9b23e02ff711de42e513aa55f768a4f1c67c0e41",
"shasum": ""
},
"require": {
@ -4258,10 +4258,20 @@
}
],
"description": "Microsoft Azure OAuth2 Provider for Laravel Socialite",
"keywords": [
"azure",
"laravel",
"microsoft",
"oauth",
"provider",
"socialite"
],
"support": {
"source": "https://github.com/SocialiteProviders/Microsoft-Azure/tree/4.2.1"
"docs": "https://socialiteproviders.com/microsoft-azure",
"issues": "https://github.com/socialiteproviders/providers/issues",
"source": "https://github.com/socialiteproviders/providers"
},
"time": "2021-06-14T22:51:38+00:00"
"time": "2021-10-07T22:21:59+00:00"
},
{
"name": "socialiteproviders/okta",
@ -4515,16 +4525,16 @@
},
{
"name": "symfony/console",
"version": "v4.4.30",
"version": "v4.4.33",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "a3f7189a0665ee33b50e9e228c46f50f5acbed22"
"reference": "8dbd23ef7a8884051482183ddee8d9061b5feed0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/a3f7189a0665ee33b50e9e228c46f50f5acbed22",
"reference": "a3f7189a0665ee33b50e9e228c46f50f5acbed22",
"url": "https://api.github.com/repos/symfony/console/zipball/8dbd23ef7a8884051482183ddee8d9061b5feed0",
"reference": "8dbd23ef7a8884051482183ddee8d9061b5feed0",
"shasum": ""
},
"require": {
@ -4585,7 +4595,7 @@
"description": "Eases the creation of beautiful and testable command line interfaces",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/console/tree/v4.4.30"
"source": "https://github.com/symfony/console/tree/v4.4.33"
},
"funding": [
{
@ -4601,7 +4611,7 @@
"type": "tidelift"
}
],
"time": "2021-08-25T19:27:26+00:00"
"time": "2021-10-25T16:36:08+00:00"
},
{
"name": "symfony/css-selector",
@ -5177,16 +5187,16 @@
},
{
"name": "symfony/http-foundation",
"version": "v4.4.30",
"version": "v4.4.33",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
"reference": "09b3202651ab23ac8dcf455284a48a3500e56731"
"reference": "b9a91102f548e0111f4996e8c622fb1d1d479850"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/09b3202651ab23ac8dcf455284a48a3500e56731",
"reference": "09b3202651ab23ac8dcf455284a48a3500e56731",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/b9a91102f548e0111f4996e8c622fb1d1d479850",
"reference": "b9a91102f548e0111f4996e8c622fb1d1d479850",
"shasum": ""
},
"require": {
@ -5225,7 +5235,7 @@
"description": "Defines an object-oriented layer for the HTTP specification",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/http-foundation/tree/v4.4.30"
"source": "https://github.com/symfony/http-foundation/tree/v4.4.33"
},
"funding": [
{
@ -5241,20 +5251,20 @@
"type": "tidelift"
}
],
"time": "2021-08-26T15:51:23+00:00"
"time": "2021-10-07T15:31:35+00:00"
},
{
"name": "symfony/http-kernel",
"version": "v4.4.32",
"version": "v4.4.33",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-kernel.git",
"reference": "f7bda3ea8f05ae90627400e58af5179b25ce0f38"
"reference": "6f1fcca1154f782796549f4f4e5090bae9525c0e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/f7bda3ea8f05ae90627400e58af5179b25ce0f38",
"reference": "f7bda3ea8f05ae90627400e58af5179b25ce0f38",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/6f1fcca1154f782796549f4f4e5090bae9525c0e",
"reference": "6f1fcca1154f782796549f4f4e5090bae9525c0e",
"shasum": ""
},
"require": {
@ -5329,7 +5339,7 @@
"description": "Provides a structured process for converting a Request into a Response",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/http-kernel/tree/v4.4.32"
"source": "https://github.com/symfony/http-kernel/tree/v4.4.33"
},
"funding": [
{
@ -5345,7 +5355,7 @@
"type": "tidelift"
}
],
"time": "2021-09-28T10:20:04+00:00"
"time": "2021-10-29T08:14:01+00:00"
},
{
"name": "symfony/mime",
@ -6477,16 +6487,16 @@
},
{
"name": "symfony/var-dumper",
"version": "v4.4.31",
"version": "v4.4.33",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
"reference": "1f12cc0c2e880a5f39575c19af81438464717839"
"reference": "50286e2b7189bfb4f419c0731e86632cddf7c5ee"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/1f12cc0c2e880a5f39575c19af81438464717839",
"reference": "1f12cc0c2e880a5f39575c19af81438464717839",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/50286e2b7189bfb4f419c0731e86632cddf7c5ee",
"reference": "50286e2b7189bfb4f419c0731e86632cddf7c5ee",
"shasum": ""
},
"require": {
@ -6546,7 +6556,7 @@
"dump"
],
"support": {
"source": "https://github.com/symfony/var-dumper/tree/v4.4.31"
"source": "https://github.com/symfony/var-dumper/tree/v4.4.33"
},
"funding": [
{
@ -6562,7 +6572,7 @@
"type": "tidelift"
}
],
"time": "2021-09-24T15:30:11+00:00"
"time": "2021-10-25T20:24:58+00:00"
},
{
"name": "tijsverkoyen/css-to-inline-styles",
@ -6919,16 +6929,16 @@
},
{
"name": "composer/ca-bundle",
"version": "1.2.11",
"version": "1.3.1",
"source": {
"type": "git",
"url": "https://github.com/composer/ca-bundle.git",
"reference": "0b072d51c5a9c6f3412f7ea3ab043d6603cb2582"
"reference": "4c679186f2aca4ab6a0f1b0b9cf9252decb44d0b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/ca-bundle/zipball/0b072d51c5a9c6f3412f7ea3ab043d6603cb2582",
"reference": "0b072d51c5a9c6f3412f7ea3ab043d6603cb2582",
"url": "https://api.github.com/repos/composer/ca-bundle/zipball/4c679186f2aca4ab6a0f1b0b9cf9252decb44d0b",
"reference": "4c679186f2aca4ab6a0f1b0b9cf9252decb44d0b",
"shasum": ""
},
"require": {
@ -6975,7 +6985,7 @@
"support": {
"irc": "irc://irc.freenode.org/composer",
"issues": "https://github.com/composer/ca-bundle/issues",
"source": "https://github.com/composer/ca-bundle/tree/1.2.11"
"source": "https://github.com/composer/ca-bundle/tree/1.3.1"
},
"funding": [
{
@ -6991,20 +7001,20 @@
"type": "tidelift"
}
],
"time": "2021-09-25T20:32:43+00:00"
"time": "2021-10-28T20:44:15+00:00"
},
{
"name": "composer/composer",
"version": "2.1.9",
"version": "2.1.10",
"source": {
"type": "git",
"url": "https://github.com/composer/composer.git",
"reference": "e558c88f28d102d497adec4852802c0dc14c7077"
"reference": "ea5f64d1a15c66942979b804c9fb3686be852ca0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/composer/zipball/e558c88f28d102d497adec4852802c0dc14c7077",
"reference": "e558c88f28d102d497adec4852802c0dc14c7077",
"url": "https://api.github.com/repos/composer/composer/zipball/ea5f64d1a15c66942979b804c9fb3686be852ca0",
"reference": "ea5f64d1a15c66942979b804c9fb3686be852ca0",
"shasum": ""
},
"require": {
@ -7015,7 +7025,7 @@
"composer/xdebug-handler": "^2.0",
"justinrainbow/json-schema": "^5.2.11",
"php": "^5.3.2 || ^7.0 || ^8.0",
"psr/log": "^1.0",
"psr/log": "^1.0 || ^2.0",
"react/promise": "^1.2 || ^2.7",
"seld/jsonlint": "^1.4",
"seld/phar-utils": "^1.0",
@ -7039,7 +7049,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.1-dev"
"dev-main": "2.1-dev"
}
},
"autoload": {
@ -7073,7 +7083,7 @@
"support": {
"irc": "ircs://irc.libera.chat:6697/composer",
"issues": "https://github.com/composer/composer/issues",
"source": "https://github.com/composer/composer/tree/2.1.9"
"source": "https://github.com/composer/composer/tree/2.1.10"
},
"funding": [
{
@ -7089,7 +7099,7 @@
"type": "tidelift"
}
],
"time": "2021-10-05T07:47:38+00:00"
"time": "2021-10-29T20:34:57+00:00"
},
{
"name": "composer/metadata-minifier",
@ -8230,23 +8240,23 @@
},
{
"name": "phpunit/php-code-coverage",
"version": "9.2.7",
"version": "9.2.8",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "d4c798ed8d51506800b441f7a13ecb0f76f12218"
"reference": "cf04e88a2e3c56fc1a65488afd493325b4c1bc3e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/d4c798ed8d51506800b441f7a13ecb0f76f12218",
"reference": "d4c798ed8d51506800b441f7a13ecb0f76f12218",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/cf04e88a2e3c56fc1a65488afd493325b4c1bc3e",
"reference": "cf04e88a2e3c56fc1a65488afd493325b4c1bc3e",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-libxml": "*",
"ext-xmlwriter": "*",
"nikic/php-parser": "^4.12.0",
"nikic/php-parser": "^4.13.0",
"php": ">=7.3",
"phpunit/php-file-iterator": "^3.0.3",
"phpunit/php-text-template": "^2.0.2",
@ -8295,7 +8305,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.7"
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.8"
},
"funding": [
{
@ -8303,7 +8313,7 @@
"type": "github"
}
],
"time": "2021-09-17T05:39:03+00:00"
"time": "2021-10-30T08:01:38+00:00"
},
{
"name": "phpunit/php-file-iterator",