@@ -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 | } |
@@ -134,8 +134,8 @@ |
||
134 | 134 | } |
135 | 135 | // Get the X509 certificate for the selected key id |
136 | 136 | $certificate = '-----BEGIN CERTIFICATE-----'.PHP_EOL |
137 | - .$x5c.PHP_EOL |
|
138 | - .'-----END CERTIFICATE-----'; |
|
137 | + .$x5c.PHP_EOL |
|
138 | + .'-----END CERTIFICATE-----'; |
|
139 | 139 | // Perform the verification and get the verified payload results |
140 | 140 | $payload = \Firebase\JWT\JWT::decode($accessToken, $certificate, ['RS256']); |
141 | 141 |
@@ -18,12 +18,12 @@ |
||
18 | 18 | $table->string('password')->nullable()->change(); |
19 | 19 | // We need a new string field to store the oauth provider unique id in |
20 | 20 | $table->string('azure_id', 36) |
21 | - ->nullable() |
|
22 | - ->after('email'); |
|
21 | + ->nullable() |
|
22 | + ->after('email'); |
|
23 | 23 | // We need a new string field to store the user principal name in |
24 | 24 | $table->string('userPrincipalName') |
25 | - ->nullable() |
|
26 | - ->after('azure_id'); |
|
25 | + ->nullable() |
|
26 | + ->after('azure_id'); |
|
27 | 27 | }); |
28 | 28 | // We dont support password resets because social identity is external |
29 | 29 | Schema::dropIfExists('password_resets'); |
@@ -41,8 +41,8 @@ discard block |
||
41 | 41 | $graph = new \Microsoft\Graph\Graph(); |
42 | 42 | $graph->setAccessToken($accessToken); |
43 | 43 | $user = $graph->createRequest('GET', '/me') |
44 | - ->setReturnType(\Microsoft\Graph\Model\User::class) |
|
45 | - ->execute(); |
|
44 | + ->setReturnType(\Microsoft\Graph\Model\User::class) |
|
45 | + ->execute(); |
|
46 | 46 | |
47 | 47 | return $user->jsonSerialize(); |
48 | 48 | } |
@@ -173,9 +173,9 @@ discard block |
||
173 | 173 | if (count($groups)) { |
174 | 174 | // remove the users existing database roles before assigning new ones |
175 | 175 | \DB::table('assigned_roles') |
176 | - ->where('entity_id', $user->id) |
|
177 | - ->where('entity_type', get_class($user)) |
|
178 | - ->delete(); |
|
176 | + ->where('entity_id', $user->id) |
|
177 | + ->where('entity_type', get_class($user)) |
|
178 | + ->delete(); |
|
179 | 179 | // TRY to add the user to each group they are assigned |
180 | 180 | try { |
181 | 181 | $user->assign($groups); |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | public function redirectToOauthAdminConsent(\Illuminate\Http\Request $request) |
42 | 42 | { |
43 | 43 | $url = $this->azureActiveDirectory->buildAdminConsentUrl(config('enterpriseauth.credentials.client_id'), |
44 | - config('enterpriseauth.credentials.callback_url')); |
|
44 | + config('enterpriseauth.credentials.callback_url')); |
|
45 | 45 | //return new \Illuminate\Http\RedirectResponse($url); |
46 | 46 | return redirect($url); |
47 | 47 | } |
@@ -58,8 +58,8 @@ discard block |
||
58 | 58 | public function buildAuthUrl() |
59 | 59 | { |
60 | 60 | $url = $this->azureActiveDirectory->authorizationEndpoint |
61 | - .'?' |
|
62 | - .$this->buildAuthUrlQueryString(); |
|
61 | + .'?' |
|
62 | + .$this->buildAuthUrlQueryString(); |
|
63 | 63 | |
64 | 64 | return $url; |
65 | 65 | } |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | |
102 | 102 | // Check to see if there is an intended destination url saved |
103 | 103 | $destination = $request->session() |
104 | - ->get('oauthIntendedUrl'); |
|
104 | + ->get('oauthIntendedUrl'); |
|
105 | 105 | // If there is no intended destination url, use the default |
106 | 106 | if (! $destination) { |
107 | 107 | $destination = config('enterpriseauth.redirect_on_login'); |