Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Binary file added .DS_Store
Binary file not shown.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/vendor
/node_modules
Homestead.yaml
.env
Expand Down
2 changes: 1 addition & 1 deletion app/Services/SocialAuthService.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 9 additions & 1 deletion config/services.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,14 @@
'version' => env('LDAP_VERSION', false),
'email_attribute' => env('LDAP_EMAIL_ATTRIBUTE', 'mail'),
'follow_referrals' => env('LDAP_FOLLOW_REFERRALS', false),
]
],

'okta' => [
'url' => env('OKTA_URL'),
'client_id' => env('OKTA_CLIENT_ID'),
'client_secret' => env('OKTA_CLIENT_SECRET'),
'redirect' => env('OKTA_REDIRECT'),
'name' => 'Okta',
]

];
42 changes: 42 additions & 0 deletions resources/assets/icons/okta.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added vendor/.DS_Store
Binary file not shown.
21 changes: 21 additions & 0 deletions vendor/laravel/browser-kit-testing/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) Taylor Otwell

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
29 changes: 29 additions & 0 deletions vendor/laravel/browser-kit-testing/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "laravel/browser-kit-testing",
"description": "Provides backwards compatibility for BrowserKit testing in Laravel 5.4.",
"keywords": ["laravel", "testing"],
"license": "MIT",
"authors": [
{
"name": "Taylor Otwell",
"email": "taylor@laravel.com"
}
],
"require": {
"php": ">=5.5.9",
"symfony/css-selector": "~3.1",
"symfony/dom-crawler": "~3.1"
},
"autoload": {
"psr-4": {
"Laravel\\BrowserKitTesting\\": "src/"
}
},
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"minimum-stability": "dev",
"prefer-stable": true
}
30 changes: 30 additions & 0 deletions vendor/laravel/browser-kit-testing/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Laravel BrowserKit Testing

This package provides a backwards compatibility layer for Laravel 5.3 style "BrowserKit" testing on Laravel 5.4.

## Installation

First, install this package:

composer require laravel/browser-kit-testing --dev

Next, modify your application's base `TestCase` class to extend `Laravel\BrowserKitTesting\TestCase` instead of `Illuminate\Foundation\Testing\TestCase`:

```php
<?php

namespace Tests;

use Laravel\BrowserKitTesting\TestCase as BaseTestCase;

abstract class TestCase extends BaseTestCase
{
use CreatesApplication;

public $baseUrl = 'http://localhost';

// ...
}
```

No other modifications to your tests should be necessary.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

namespace Laravel\BrowserKitTesting\Concerns;

use Illuminate\Contracts\Auth\Authenticatable as UserContract;

trait ImpersonatesUsers
{
/**
* Set the currently logged in user for the application.
*
* @param \Illuminate\Contracts\Auth\Authenticatable $user
* @param string|null $driver
* @return $this
*/
public function actingAs(UserContract $user, $driver = null)
{
$this->be($user, $driver);

return $this;
}

/**
* Set the currently logged in user for the application.
*
* @param \Illuminate\Contracts\Auth\Authenticatable $user
* @param string|null $driver
* @return void
*/
public function be(UserContract $user, $driver = null)
{
$this->app['auth']->guard($driver)->setUser($user);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
<?php

namespace Laravel\BrowserKitTesting\Concerns;

trait InteractsWithAuthentication
{
/**
* Assert that the user is authenticated.
*
* @param string|null $guard
* @return $this
*/
public function seeIsAuthenticated($guard = null)
{
$this->assertTrue($this->isAuthenticated($guard), 'The user is not authenticated');

return $this;
}

/**
* Assert that the user is not authenticated.
*
* @param string|null $guard
* @return $this
*/
public function dontSeeIsAuthenticated($guard = null)
{
$this->assertFalse($this->isAuthenticated($guard), 'The user is authenticated');

return $this;
}

/**
* Return true if the user is authenticated, false otherwise.
*
* @param string|null $guard
* @return bool
*/
protected function isAuthenticated($guard = null)
{
return $this->app->make('auth')->guard($guard)->check();
}

/**
* Assert that the user is authenticated as the given user.
*
* @param $user
* @param string|null $guard
* @return $this
*/
public function seeIsAuthenticatedAs($user, $guard = null)
{
$expected = $this->app->make('auth')->guard($guard)->user();

$this->assertInstanceOf(
get_class($expected), $user,
'The currently authenticated user is not who was expected'
);

$this->assertSame(
$expected->getAuthIdentifier(), $user->getAuthIdentifier(),
'The currently authenticated user is not who was expected'
);

return $this;
}

/**
* Assert that the given credentials are valid.
*
* @param array $credentials
* @param string|null $guard
* @return $this
*/
public function seeCredentials(array $credentials, $guard = null)
{
$this->assertTrue(
$this->hasCredentials($credentials, $guard), 'The given credentials are invalid.'
);

return $this;
}

/**
* Assert that the given credentials are invalid.
*
* @param array $credentials
* @param string|null $guard
* @return $this
*/
public function dontSeeCredentials(array $credentials, $guard = null)
{
$this->assertFalse(
$this->hasCredentials($credentials, $guard), 'The given credentials are valid.'
);

return $this;
}

/**
* Return true is the credentials are valid, false otherwise.
*
* @param array $credentials
* @param string|null $guard
* @return bool
*/
protected function hasCredentials(array $credentials, $guard = null)
{
$provider = $this->app->make('auth')->guard($guard)->getProvider();

$user = $provider->retrieveByCredentials($credentials);

return $user && $provider->validateCredentials($user, $credentials);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

namespace Laravel\BrowserKitTesting\Concerns;

use Illuminate\Contracts\Console\Kernel;

trait InteractsWithConsole
{
/**
* The last code returned by Artisan CLI.
*
* @var int
*/
protected $code;

/**
* Call artisan command and return code.
*
* @param string $command
* @param array $parameters
* @return int
*/
public function artisan($command, $parameters = [])
{
return $this->code = $this->app[Kernel::class]->call($command, $parameters);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

namespace Laravel\BrowserKitTesting\Concerns;

trait InteractsWithContainer
{
/**
* Register an instance of an object in the container.
*
* @param string $abstract
* @param object $instance
* @return object
*/
protected function instance($abstract, $instance)
{
$this->app->instance($abstract, $instance);

return $instance;
}
}
Loading