@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::table('users', function (Blueprint $table) { |
|
16 | + Schema::table('users', function(Blueprint $table) { |
|
17 | 17 | // Users must be able to support blank passwords for external identity |
18 | 18 | $table->string('password')->nullable()->change(); |
19 | 19 | // We need a new string field to store the oauth provider unique id in |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | |
7 | 7 | // Redirect requests to /api to the swagger documentation |
8 | 8 | //$api->any('', function (Illuminate\Http\Request $request) { |
9 | - $api->any('', function () { |
|
9 | + $api->any('', function() { |
|
10 | 10 | return redirect('api/documentation/'); |
11 | 11 | }); |
12 | 12 | |
@@ -17,6 +17,6 @@ discard block |
||
17 | 17 | * @SWG\Response(response="200", description="Hello world example") |
18 | 18 | * ) |
19 | 19 | **/ |
20 | - $api->any('/api/hello', function () { |
|
20 | + $api->any('/api/hello', function() { |
|
21 | 21 | return 'hello world'; |
22 | 22 | }); |
@@ -24,7 +24,7 @@ |
||
24 | 24 | * @SWG\Response(response="200", description="Hello world example") |
25 | 25 | * ) |
26 | 26 | **/ |
27 | -Route::middleware('api')->get('/hello', function (Request $request) { |
|
27 | +Route::middleware('api')->get('/hello', function(Request $request) { |
|
28 | 28 | return 'hello world'; |
29 | 29 | }); |
30 | 30 |
@@ -35,7 +35,7 @@ |
||
35 | 35 | if ($tenantName != 'common') { |
36 | 36 | // Make sure the tenant is formatted like xyzcorp.onmicrosoft.com |
37 | 37 | $regex = '/\.onmicrosoft\.com/'; |
38 | - if (! preg_match($regex, $tenantName, $hits)) { |
|
38 | + if (!preg_match($regex, $tenantName, $hits)) { |
|
39 | 39 | // Append the suffix if it is missing |
40 | 40 | $tenantName .= '.onmicrosoft.com'; |
41 | 41 | } |
@@ -46,18 +46,18 @@ |
||
46 | 46 | public function buildOpenIdConfigUrl() |
47 | 47 | { |
48 | 48 | $this->openIdConfigUrl = $this->baseUrl.'/' |
49 | - .$this->tenantName.'/' |
|
50 | - .$this->version.'/' |
|
51 | - .$this->wellKnownOpenIdConfig; |
|
49 | + .$this->tenantName.'/' |
|
50 | + .$this->version.'/' |
|
51 | + .$this->wellKnownOpenIdConfig; |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | public function buildAdminConsentUrl($clientId, $redirectUri) |
55 | 55 | { |
56 | 56 | $url = $this->baseUrl.'/' |
57 | - .$this->tenantName.'/' |
|
58 | - .'adminconsent' |
|
59 | - .'?client_id='.$clientId |
|
60 | - .'&redirect_uri='.$redirectUri; |
|
57 | + .$this->tenantName.'/' |
|
58 | + .'adminconsent' |
|
59 | + .'?client_id='.$clientId |
|
60 | + .'&redirect_uri='.$redirectUri; |
|
61 | 61 | |
62 | 62 | return $url; |
63 | 63 | } |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | public function __construct($azureActiveDirectory) |
14 | 14 | { |
15 | 15 | // IF they didnt pre-populate all our AAD stuff then make a new one for the common tenant |
16 | - if (! $azureActiveDirectory) { |
|
16 | + if (!$azureActiveDirectory) { |
|
17 | 17 | $azureActiveDirectory = new AzureActiveDirectory(); |
18 | 18 | } |
19 | 19 | $this->azureActiveDirectory = $azureActiveDirectory; |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | |
28 | 28 | protected function getAccessToken() |
29 | 29 | { |
30 | - if (! $this->accessToken) { |
|
30 | + if (!$this->accessToken) { |
|
31 | 31 | $this->authenticateAsApplication(); |
32 | 32 | } |
33 | 33 |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | */ |
58 | 58 | public function check() |
59 | 59 | { |
60 | - return ! is_null($this->user()); |
|
60 | + return !is_null($this->user()); |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | /** |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | */ |
68 | 68 | public function guest() |
69 | 69 | { |
70 | - return ! $this->check(); |
|
70 | + return !$this->check(); |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | /** |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | */ |
78 | 78 | public function user() |
79 | 79 | { |
80 | - if (! is_null($this->user)) { |
|
80 | + if (!is_null($this->user)) { |
|
81 | 81 | return $this->user; |
82 | 82 | } |
83 | 83 | } |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | // Authenticated user information routes |
4 | -Route::middleware([config('enterpriseauth.apiroutes.middleware'), config('enterpriseauth.apiroutes.authmiddleware')])->group(function () { |
|
4 | +Route::middleware([config('enterpriseauth.apiroutes.middleware'), config('enterpriseauth.apiroutes.authmiddleware')])->group(function() { |
|
5 | 5 | |
6 | 6 | /** |
7 | 7 | * @SWG\Get( |
@@ -46,7 +46,7 @@ |
||
46 | 46 | */ |
47 | 47 | public function guest() |
48 | 48 | { |
49 | - return ! $this->check(); |
|
49 | + return !$this->check(); |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | /** |
@@ -98,7 +98,7 @@ |
||
98 | 98 | { |
99 | 99 | //dd($user); |
100 | 100 | // WELL this is extremely stupid. if email address isnt set, use their UPN... |
101 | - if (! $user['mail']) { |
|
101 | + if (!$user['mail']) { |
|
102 | 102 | $user['mail'] = $user['userPrincipalName']; |
103 | 103 | } |
104 | 104 |