@@ -220,7 +220,7 @@ |
||
| 220 | 220 | /** |
| 221 | 221 | * Set clas |
| 222 | 222 | * |
| 223 | - * @param string|object $class |
|
| 223 | + * @param string $class |
|
| 224 | 224 | * @return Route |
| 225 | 225 | */ |
| 226 | 226 | public function setClass($class): Route |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | /** |
| 29 | 29 | * Get raw format |
| 30 | 30 | * |
| 31 | - * @return mixed |
|
| 31 | + * @return \SimpleXMLElement |
|
| 32 | 32 | */ |
| 33 | 33 | public function getRaw(); |
| 34 | 34 | |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | * Get from config |
| 38 | 38 | * |
| 39 | 39 | * @param string $name |
| 40 | - * @return mixed |
|
| 40 | + * @return \SimpleXMLElement |
|
| 41 | 41 | */ |
| 42 | 42 | public function __get(string $name); |
| 43 | 43 | |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | { |
| 190 | 190 | if($this->token_validation_url) { |
| 191 | 191 | $this->logger->debug('validate oauth2 token via rfc7662 token validation endpoint ['.$this->token_validation_url.']', [ |
| 192 | - 'category' => get_class($this), |
|
| 192 | + 'category' => get_class($this), |
|
| 193 | 193 | ]); |
| 194 | 194 | |
| 195 | 195 | $url = str_replace('{token}', $token, $this->token_validation_url); |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | } |
| 201 | 201 | |
| 202 | 202 | $this->logger->debug('validate token via openid-connect userinfo_endpoint ['.$discovery['userinfo_endpoint'].']', [ |
| 203 | - 'category' => get_class($this), |
|
| 203 | + 'category' => get_class($this), |
|
| 204 | 204 | ]); |
| 205 | 205 | |
| 206 | 206 | $url = $discovery['userinfo_endpoint'].'?access_token='.$token; |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | if($code === 200) { |
| 218 | 218 | $attributes = json_decode($result, true); |
| 219 | 219 | $this->logger->debug('successfully verified oauth2 access token via authorization server', [ |
| 220 | - 'category' => get_class($this), |
|
| 220 | + 'category' => get_class($this), |
|
| 221 | 221 | ]); |
| 222 | 222 | |
| 223 | 223 | if(!isset($attributes[$this->identity_attribute])) { |
@@ -235,7 +235,7 @@ discard block |
||
| 235 | 235 | return true; |
| 236 | 236 | } else { |
| 237 | 237 | $this->logger->error('failed verify oauth2 access token via authorization server, received status ['.$code.']', [ |
| 238 | - 'category' => get_class($this), |
|
| 238 | + 'category' => get_class($this), |
|
| 239 | 239 | ]); |
| 240 | 240 | |
| 241 | 241 | throw new Exception('failed verify oauth2 access token via authorization server'); |
@@ -260,7 +260,7 @@ discard block |
||
| 260 | 260 | } |
| 261 | 261 | |
| 262 | 262 | $this->logger->debug('fetch user attributes from userinfo_endpoint ['.$discovery['userinfo_endpoint'].']', [ |
| 263 | - 'category' => get_class($this), |
|
| 263 | + 'category' => get_class($this), |
|
| 264 | 264 | ]); |
| 265 | 265 | |
| 266 | 266 | $url = $discovery['userinfo_endpoint'].'?access_token='.$this->access_token; |
@@ -275,13 +275,13 @@ discard block |
||
| 275 | 275 | if($code === 200) { |
| 276 | 276 | $attributes = json_decode($result, true); |
| 277 | 277 | $this->logger->debug('successfully requested user attributes from userinfo_endpoint', [ |
| 278 | - 'category' => get_class($this), |
|
| 278 | + 'category' => get_class($this), |
|
| 279 | 279 | ]); |
| 280 | 280 | |
| 281 | 281 | return $this->attributes = $attributes; |
| 282 | 282 | } else { |
| 283 | 283 | $this->logger->error('failed requesting user attributes from userinfo_endpoint, status code ['.$code.']', [ |
| 284 | - 'category' => get_class($this), |
|
| 284 | + 'category' => get_class($this), |
|
| 285 | 285 | ]); |
| 286 | 286 | |
| 287 | 287 | throw new Exception('failed requesting user attribute from userinfo_endpoint'); |