@@ -39,8 +39,8 @@ discard block |
||
| 39 | 39 | $graph = new \Microsoft\Graph\Graph(); |
| 40 | 40 | $graph->setAccessToken($accessToken); |
| 41 | 41 | $user = $graph->createRequest('GET', '/me') |
| 42 | - ->setReturnType(\Microsoft\Graph\Model\User::class) |
|
| 43 | - ->execute(); |
|
| 42 | + ->setReturnType(\Microsoft\Graph\Model\User::class) |
|
| 43 | + ->execute(); |
|
| 44 | 44 | |
| 45 | 45 | return $user->jsonSerialize(); |
| 46 | 46 | } |
@@ -131,9 +131,9 @@ discard block |
||
| 131 | 131 | if (count($groups)) { |
| 132 | 132 | // remove the users existing database roles before assigning new ones |
| 133 | 133 | \DB::table('assigned_roles') |
| 134 | - ->where('entity_id', $user->id) |
|
| 135 | - ->where('entity_type', get_class($user)) |
|
| 136 | - ->delete(); |
|
| 134 | + ->where('entity_id', $user->id) |
|
| 135 | + ->where('entity_type', get_class($user)) |
|
| 136 | + ->delete(); |
|
| 137 | 137 | // add the user to each group they are assigned |
| 138 | 138 | $user->assign($groups); |
| 139 | 139 | } |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | public function redirectToOauthAdminConsent(\Illuminate\Http\Request $request) |
| 41 | 41 | { |
| 42 | 42 | $url = $this->azureActiveDirectory->buildAdminConsentUrl(config('enterpriseauth.credentials.client_id'), |
| 43 | - config('enterpriseauth.credentials.callback_url')); |
|
| 43 | + config('enterpriseauth.credentials.callback_url')); |
|
| 44 | 44 | //return new \Illuminate\Http\RedirectResponse($url); |
| 45 | 45 | return redirect($url); |
| 46 | 46 | } |
@@ -57,8 +57,8 @@ discard block |
||
| 57 | 57 | public function buildAuthUrl() |
| 58 | 58 | { |
| 59 | 59 | $url = $this->azureActiveDirectory->authorizationEndpoint |
| 60 | - .'?' |
|
| 61 | - .$this->buildAuthUrlQueryString(); |
|
| 60 | + .'?' |
|
| 61 | + .$this->buildAuthUrlQueryString(); |
|
| 62 | 62 | |
| 63 | 63 | return $url; |
| 64 | 64 | } |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | |
| 101 | 101 | // Check to see if there is an intended destination url saved |
| 102 | 102 | $destination = $request->session() |
| 103 | - ->get('oauthIntendedUrl'); |
|
| 103 | + ->get('oauthIntendedUrl'); |
|
| 104 | 104 | // If there is no intended destination url, use the default |
| 105 | 105 | if (! $destination) { |
| 106 | 106 | $destination = config('enterpriseauth.redirect_on_login'); |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | 'client_secret' => config('enterpriseauth.credentials.client_secret'), |
| 127 | 127 | 'redirect_uri' => config('enterpriseauth.credentials.callback_url'), |
| 128 | 128 | 'grant_type' => 'authorization_code', |
| 129 | - ], |
|
| 129 | + ], |
|
| 130 | 130 | ]; |
| 131 | 131 | $response = $guzzle->post($url, $parameters); |
| 132 | 132 | $responseObject = json_decode($response->getBody()); |
@@ -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 | |