Add socialite authentication for okta

This commit is contained in:
Timo Bartholomes 2017-11-26 16:41:29 +01:00
parent 7668a999a2
commit 009af9736e
7 changed files with 54 additions and 3 deletions

View File

@ -46,6 +46,9 @@ GITHUB_APP_ID=false
GITHUB_APP_SECRET=false
GOOGLE_APP_ID=false
GOOGLE_APP_SECRET=false
OKTA_BASE_URL=false
OKTA_KEY=false
OKTA_SECRET=false
# External services such as Gravatar
DISABLE_EXTERNAL_SERVICES=false

View File

@ -17,6 +17,7 @@ class EventServiceProvider extends ServiceProvider
SocialiteWasCalled::class => [
'SocialiteProviders\Slack\SlackExtendSocialite@handle',
'SocialiteProviders\Azure\AzureExtendSocialite@handle',
'SocialiteProviders\Okta\OktaExtendSocialite@handle',
],
];

View File

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

View File

@ -17,7 +17,8 @@
"gathercontent/htmldiff": "^0.2.1",
"barryvdh/laravel-snappy": "^0.4.0",
"socialiteproviders/slack": "^3.0",
"socialiteproviders/microsoft-azure": "^3.0"
"socialiteproviders/microsoft-azure": "^3.0",
"socialiteproviders/okta": "^1.0"
},
"require-dev": {
"filp/whoops": "~2.0",

39
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"content-hash": "7aa47303355cad47ffc59a24bcce2b1a",
"content-hash": "384c1805a51b16b9304ab3ac58f9554d",
"packages": [
{
"name": "aws/aws-sdk-php",
@ -2161,6 +2161,43 @@
"description": "Microsoft Azure OAuth2 Provider for Laravel Socialite",
"time": "2017-01-25T09:48:29+00:00"
},
{
"name": "socialiteproviders/okta",
"version": "v1.0.0",
"source": {
"type": "git",
"url": "https://github.com/SocialiteProviders/Okta.git",
"reference": "dcda13432c80060cd84d4cb5f2af422d280ab895"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/SocialiteProviders/Okta/zipball/dcda13432c80060cd84d4cb5f2af422d280ab895",
"reference": "dcda13432c80060cd84d4cb5f2af422d280ab895",
"shasum": ""
},
"require": {
"php": "^5.6 || ^7.0",
"socialiteproviders/manager": "~2.0 || ~3.0"
},
"type": "library",
"autoload": {
"psr-4": {
"SocialiteProviders\\Okta\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Chase Coney",
"email": "chase.coney@gmail.com"
}
],
"description": "Okta OAuth2 Provider for Laravel Socialite",
"time": "2017-11-21T05:31:47+00:00"
},
{
"name": "socialiteproviders/slack",
"version": "v3.0.3",

View File

@ -80,6 +80,14 @@ return [
'name' => 'Microsoft Azure',
],
'okta' => [
'client_id' => env('OKTA_KEY'),
'client_secret' => env('OKTA_SECRET'),
'redirect' => env('APP_URL') . '/login/service/okta/callback',
'base_url' => env('OKTA_BASE_URL'),
'name' => 'Okta',
],
'ldap' => [
'server' => env('LDAP_SERVER', false),
'dn' => env('LDAP_DN', false),

View File

@ -0,0 +1 @@
<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;"><use id="image0" xlink:href="#_Image1" x="0" y="0" width="64px" height="64px"/><defs><image id="_Image1" width="24px" height="24px" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAA7EAAAOxAGVKw4bAAACU0lEQVRIiaWVTUiUURSGn3PnGyXDrAjaVEIlGG2ElhHjT4RR6aZFtGgR1KaNFBjliJg/lT9tohbtWlvQD4SLUMehVhFBm3IpQYlZljSOOXNPixl/596Z0d7VcJ7zvufeb+79PiGfrj8vI7w9jlAJVABBlvwFZrH2HWKa6Y6kfBHirEbHqhAZBvbnXcCK3qC2ie66H+uByWltj7UiMrGBcICjiJkhOnYm/4CO+BPg7gaC10rkBdGxm2tKy7/ax6+BDmw6fLVU6+muHV0Z0Bbfi7GThWyAzXpyH+162YUt9JxIZhqNfZWnNY3qcVTLmTQBidkAayuw6SvZoW5JyYPMDqIjO5BQzr+f1QTjI9XEOt1BrcNbKS37Clru5F0RMUjooXflU78OecMB+hr/YNV/2m68bjZAgxOqvcijJus1L6kn8h2Vp04WhPsM4Nqeouo2OWVbPKDCACUOsIglWXS+6m8PKTW4T4Igxv0acct3bNUACw4QBrYVH292esi8AX46kXCn6AFi3nrItMHqffeq5BJtowcLhnfEm1G728kSiUZDYu6e12zMZ6KxGi9vj53C2mceahk8+U2yjUPAWW+Q6geUcximsBiwBzChIaDS64FWuiL9mS9UKnWeIPAPEKlB+JTZFUAoTy4ASRJzA8vt3G5YRMyRQq4iZUmn9zF4WlcGANw69p5QcOE/w9PAYXrrp5cKuZcpOl6F6MTm4nUXvbUzq0vu23r1paGsvB+RFgp/XJJAJ10R570p/DpoG6lGQo8R9gCl2eo8qh9RvUxP3Zd89n+rAbY6AaOFBwAAAABJRU5ErkJggg=="/></defs></svg>

After

Width:  |  Height:  |  Size: 1.3 KiB