Added azureAD social auth option

Closes #509
This commit is contained in:
Dan Brown 2017-10-01 13:19:17 +01:00
parent 481aa5b5b0
commit 9ba29770e1
No known key found for this signature in database
GPG Key ID: 46D9F943C24A2EF9
6 changed files with 52 additions and 4 deletions

View File

@ -16,6 +16,7 @@ class EventServiceProvider extends ServiceProvider
protected $listen = [
SocialiteWasCalled::class => [
'SocialiteProviders\Slack\SlackExtendSocialite@handle',
'SocialiteProviders\Azure\AzureExtendSocialite@handle',
],
];

View File

@ -14,7 +14,7 @@ class SocialAuthService
protected $socialite;
protected $socialAccount;
protected $validSocialDrivers = ['google', 'github', 'facebook', 'slack', 'twitter'];
protected $validSocialDrivers = ['google', 'github', 'facebook', 'slack', 'twitter', 'azure'];
/**
* SocialAuthService constructor.

View File

@ -18,7 +18,8 @@
"gathercontent/htmldiff": "^0.2.1",
"barryvdh/laravel-snappy": "^0.3.1",
"laravel/browser-kit-testing": "^1.0",
"socialiteproviders/slack": "^3.0"
"socialiteproviders/slack": "^3.0",
"socialiteproviders/microsoft-azure": "^3.0"
},
"require-dev": {
"fzaninotto/faker": "~1.4",

41
composer.lock generated
View File

@ -4,8 +4,8 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"hash": "e6d32752d02dae662bedc69fa5856feb",
"content-hash": "5f0f4e912f1207e761caf9344f2308a0",
"hash": "aa5f3333b909857a179e6aa9c30ab9ab",
"content-hash": "dc4c98aa8942f27fde6a9faa440e1a74",
"packages": [
{
"name": "aws/aws-sdk-php",
@ -2073,6 +2073,43 @@
"description": "Easily add new or override built-in providers in Laravel Socialite.",
"time": "2017-02-07 07:26:42"
},
{
"name": "socialiteproviders/microsoft-azure",
"version": "v3.0.0",
"source": {
"type": "git",
"url": "https://github.com/SocialiteProviders/Microsoft-Azure.git",
"reference": "d7a703a782eb9f7eae0db803beaa3ddec19ef372"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/SocialiteProviders/Microsoft-Azure/zipball/d7a703a782eb9f7eae0db803beaa3ddec19ef372",
"reference": "d7a703a782eb9f7eae0db803beaa3ddec19ef372",
"shasum": ""
},
"require": {
"php": "^5.6 || ^7.0",
"socialiteproviders/manager": "~3.0"
},
"type": "library",
"autoload": {
"psr-4": {
"SocialiteProviders\\Azure\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Chris Hemmings",
"email": "chris@hemmin.gs"
}
],
"description": "Microsoft Azure OAuth2 Provider for Laravel Socialite",
"time": "2017-01-25 09:48:29"
},
{
"name": "socialiteproviders/slack",
"version": "v3.0.1",

View File

@ -72,6 +72,14 @@ return [
'name' => 'Twitter',
],
'azure' => [
'client_id' => env('AZURE_APP_ID', false),
'client_secret' => env('AZURE_APP_SECRET', false),
'tenant' => env('AZURE_TENANT', false),
'redirect' => env('APP_URL') . '/login/service/azure/callback',
'name' => 'Microsoft Azure',
],
'ldap' => [
'server' => env('LDAP_SERVER', false),
'dn' => env('LDAP_DN', false),

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 129 129"><path fill="#f25022" d="M0 0h61.3v61.3H0z"/><path fill="#7fba00" d="M67.7 0H129v61.3H67.7z"/><path fill="#00a4ef" d="M0 67.7h61.3V129H0z"/><path fill="#ffb900" d="M67.7 67.7H129V129H67.7z"/></svg>

After

Width:  |  Height:  |  Size: 258 B