@@ -45,9 +45,9 @@ |
||
45 | 45 | } |
46 | 46 | |
47 | 47 | private function admin_details() { |
48 | - $object = new stdClass(); |
|
49 | - $object->preferred_username = "admin"; |
|
50 | - return $object; |
|
48 | + $object = new stdClass(); |
|
49 | + $object->preferred_username = "admin"; |
|
50 | + return $object; |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | public function get_user_details() { |
@@ -17,7 +17,9 @@ discard block |
||
17 | 17 | } |
18 | 18 | |
19 | 19 | public function force_authentication() { |
20 | - if ($this->is_authenticated()) return; |
|
20 | + if ($this->is_authenticated()) { |
|
21 | + return; |
|
22 | + } |
|
21 | 23 | $oidc = $this->construct_oidc(); |
22 | 24 | $oidc->authenticate(); |
23 | 25 | } |
@@ -52,7 +54,9 @@ discard block |
||
52 | 54 | |
53 | 55 | public function get_user_details() { |
54 | 56 | global $cfg; |
55 | - if ($cfg['debug']) return $this->admin_details(); |
|
57 | + if ($cfg['debug']) { |
|
58 | + return $this->admin_details(); |
|
59 | + } |
|
56 | 60 | |
57 | 61 | $oidc = $this->construct_oidc(); |
58 | 62 | if (!$oidc->getIdToken()) { |
@@ -60,7 +64,9 @@ discard block |
||
60 | 64 | } |
61 | 65 | |
62 | 66 | $details = $oidc->requestUserInfo(); |
63 | - if (isset($details->error)) $oidc->refreshTokens(); |
|
67 | + if (isset($details->error)) { |
|
68 | + $oidc->refreshTokens(); |
|
69 | + } |
|
64 | 70 | return $oidc->requestUserInfo(); |
65 | 71 | } |
66 | 72 | } |