@@ -35,7 +35,7 @@ |
||
| 35 | 35 | /** |
| 36 | 36 | * @param \Symfony\Component\HttpFoundation\Request $request |
| 37 | 37 | * @throws \InvalidArgumentException if cannot manage the Request |
| 38 | - * @return \Symfony\Component\HttpFoundation\Response|SamlSpInfo|null |
|
| 38 | + * @return \Symfony\Component\HttpFoundation\RedirectResponse |
|
| 39 | 39 | */ |
| 40 | 40 | public function manage(Request $request) |
| 41 | 41 | { |
@@ -42,6 +42,11 @@ |
||
| 42 | 42 | |
| 43 | 43 | |
| 44 | 44 | |
| 45 | + /** |
|
| 46 | + * @param string $authenticationServiceID |
|
| 47 | + * @param string $checkPath |
|
| 48 | + * @param string $logoutPath |
|
| 49 | + */ |
|
| 45 | 50 | public function __construct( |
| 46 | 51 | $authenticationServiceID, |
| 47 | 52 | SPSigningProviderInterface $signingProvider, |
@@ -30,6 +30,9 @@ discard block |
||
| 30 | 30 | |
| 31 | 31 | |
| 32 | 32 | |
| 33 | + /** |
|
| 34 | + * @param string $providerKey |
|
| 35 | + */ |
|
| 33 | 36 | public function __construct( |
| 34 | 37 | $providerKey, |
| 35 | 38 | UserManagerInterface $userProvider = null, |
@@ -52,7 +55,7 @@ discard block |
||
| 52 | 55 | /** |
| 53 | 56 | * Attempts to authenticate a TokenInterface object. |
| 54 | 57 | * @param TokenInterface $token The TokenInterface instance to authenticate |
| 55 | - * @return TokenInterface An authenticated TokenInterface instance, never null |
|
| 58 | + * @return null|SamlSpToken An authenticated TokenInterface instance, never null |
|
| 56 | 59 | * @throws AuthenticationException if the authentication fails |
| 57 | 60 | */ |
| 58 | 61 | public function authenticate(TokenInterface $token) |
@@ -82,7 +85,7 @@ discard block |
||
| 82 | 85 | |
| 83 | 86 | /** |
| 84 | 87 | * @param SamlSpToken $token |
| 85 | - * @return mixed|UserInterface |
|
| 88 | + * @return UserInterface |
|
| 86 | 89 | */ |
| 87 | 90 | protected function getUser(SamlSpToken $token) |
| 88 | 91 | { |
@@ -113,7 +116,7 @@ discard block |
||
| 113 | 116 | * @param \AerialShip\SamlSPBundle\Bridge\SamlSpInfo $samlInfo |
| 114 | 117 | * @param array $attributes |
| 115 | 118 | * @param array $roles |
| 116 | - * @param mixed $user |
|
| 119 | + * @param UserInterface $user |
|
| 117 | 120 | * @return SamlSpToken |
| 118 | 121 | */ |
| 119 | 122 | protected function createAuthenticatedToken(SamlSpInfo $samlInfo, array $attributes, array $roles, $user) |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | protected $entityClass; |
| 11 | 11 | |
| 12 | 12 | /** |
| 13 | - * @param $entityClass |
|
| 13 | + * @param string $entityClass |
|
| 14 | 14 | */ |
| 15 | 15 | public function __construct($entityClass) |
| 16 | 16 | { |
@@ -254,8 +254,8 @@ discard block |
||
| 254 | 254 | |
| 255 | 255 | |
| 256 | 256 | /** |
| 257 | - * @param $providerID |
|
| 258 | - * @param $idpID |
|
| 257 | + * @param string $providerID |
|
| 258 | + * @param string $idpID |
|
| 259 | 259 | * @param $spProvider |
| 260 | 260 | * @param $idpProvider |
| 261 | 261 | * @param $spMetaProvider |
@@ -303,7 +303,7 @@ discard block |
||
| 303 | 303 | } |
| 304 | 304 | |
| 305 | 305 | /** |
| 306 | - * @param $entityID |
|
| 306 | + * @param string $entityID |
|
| 307 | 307 | * @return EntityDescriptor|\PHPUnit_Framework_MockObject_MockObject |
| 308 | 308 | */ |
| 309 | 309 | protected function createEntityDescriptorStub($entityID) |
@@ -300,7 +300,7 @@ discard block |
||
| 300 | 300 | |
| 301 | 301 | |
| 302 | 302 | /** |
| 303 | - * @param $enabled |
|
| 303 | + * @param boolean $enabled |
|
| 304 | 304 | * @param $certificate |
| 305 | 305 | * @param $key |
| 306 | 306 | * @return SPSigningProviderInterface|\PHPUnit_Framework_MockObject_MockObject |
@@ -328,7 +328,7 @@ discard block |
||
| 328 | 328 | } |
| 329 | 329 | |
| 330 | 330 | /** |
| 331 | - * @param $generateUriReturn |
|
| 331 | + * @param string $generateUriReturn |
|
| 332 | 332 | * @return \PHPUnit_Framework_MockObject_MockObject|\Symfony\Component\Security\Http\HttpUtils |
| 333 | 333 | */ |
| 334 | 334 | protected function createHttpUtilsStub($generateUriReturn) |
@@ -350,7 +350,7 @@ discard block |
||
| 350 | 350 | |
| 351 | 351 | |
| 352 | 352 | /** |
| 353 | - * @return \PHPUnit_Framework_MockObject_MockObject|\Symfony\Component\HttpFoundation\Request |
|
| 353 | + * @return \Symfony\Component\HttpFoundation\Request |
|
| 354 | 354 | */ |
| 355 | 355 | private function createRequestMock() |
| 356 | 356 | { |
@@ -233,7 +233,7 @@ |
||
| 233 | 233 | } |
| 234 | 234 | |
| 235 | 235 | /** |
| 236 | - * @return \PHPUnit_Framework_MockObject_MockObject|\Symfony\Component\HttpFoundation\Request |
|
| 236 | + * @return \Symfony\Component\HttpFoundation\Request |
|
| 237 | 237 | */ |
| 238 | 238 | public function createRequestMock() |
| 239 | 239 | { |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | * @param bool $hasPreviousSession |
| 256 | 256 | * @param mixed $duplicateReturn |
| 257 | 257 | * @param mixed $getSessionReturn |
| 258 | - * @return \PHPUnit_Framework_MockObject_MockObject|Request |
|
| 258 | + * @return Request|null |
|
| 259 | 259 | */ |
| 260 | 260 | private function createRequestStub($hasSessionReturn = null, $hasPreviousSession = null, $duplicateReturn = null, $getSessionReturn = null) |
| 261 | 261 | { |
@@ -293,6 +293,9 @@ discard block |
||
| 293 | 293 | return $this->getMock('AerialShip\SamlSPBundle\RelyingParty\RelyingPartyInterface'); |
| 294 | 294 | } |
| 295 | 295 | |
| 296 | + /** |
|
| 297 | + * @param boolean $supportsReturn |
|
| 298 | + */ |
|
| 296 | 299 | private function createRelyingPartyStub($supportsReturn = null, $manageReturn = null) |
| 297 | 300 | { |
| 298 | 301 | $relyingPartyMock = $this->createRelyingPartyMock(); |
@@ -321,7 +324,7 @@ discard block |
||
| 321 | 324 | |
| 322 | 325 | /** |
| 323 | 326 | * @param Request|null $request |
| 324 | - * @return \PHPUnit_Framework_MockObject_MockObject|GetResponseEvent |
|
| 327 | + * @return GetResponseEvent |
|
| 325 | 328 | */ |
| 326 | 329 | private function createGetResponseEventStub($request = null) |
| 327 | 330 | { |
@@ -346,7 +349,7 @@ discard block |
||
| 346 | 349 | } |
| 347 | 350 | |
| 348 | 351 | /** |
| 349 | - * @return \PHPUnit_Framework_MockObject_MockObject|TokenStorage |
|
| 352 | + * @return \Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface |
|
| 350 | 353 | */ |
| 351 | 354 | private function createTokenStorageMock() |
| 352 | 355 | { |
@@ -362,7 +365,7 @@ discard block |
||
| 362 | 365 | } |
| 363 | 366 | |
| 364 | 367 | /** |
| 365 | - * @return \PHPUnit_Framework_MockObject_MockObject|SessionAuthenticationStrategyInterface |
|
| 368 | + * @return SessionAuthenticationStrategyInterface |
|
| 366 | 369 | */ |
| 367 | 370 | private function createSessionAuthenticationStrategyMock() |
| 368 | 371 | { |
@@ -378,8 +381,8 @@ discard block |
||
| 378 | 381 | } |
| 379 | 382 | |
| 380 | 383 | /** |
| 381 | - * @param null $checkRequestPathResult |
|
| 382 | - * @param null $createRedirectResponseReturn |
|
| 384 | + * @param boolean $checkRequestPathResult |
|
| 385 | + * @param RedirectResponse $createRedirectResponseReturn |
|
| 383 | 386 | * @return \PHPUnit_Framework_MockObject_MockObject|HttpUtils |
| 384 | 387 | */ |
| 385 | 388 | private function createHttpUtilsStub($checkRequestPathResult = null, $createRedirectResponseReturn = null) |
@@ -402,7 +405,7 @@ discard block |
||
| 402 | 405 | |
| 403 | 406 | |
| 404 | 407 | /** |
| 405 | - * @return \PHPUnit_Framework_MockObject_MockObject|AuthenticationSuccessHandlerInterface |
|
| 408 | + * @return AuthenticationSuccessHandlerInterface |
|
| 406 | 409 | */ |
| 407 | 410 | private function createAuthenticationSuccessHandlerMock() |
| 408 | 411 | { |
@@ -410,7 +413,7 @@ discard block |
||
| 410 | 413 | } |
| 411 | 414 | |
| 412 | 415 | /** |
| 413 | - * @return \PHPUnit_Framework_MockObject_MockObject|AuthenticationSuccessHandlerInterface |
|
| 416 | + * @return AuthenticationSuccessHandlerInterface |
|
| 414 | 417 | */ |
| 415 | 418 | protected function createAuthenticationSuccessHandlerStub() |
| 416 | 419 | { |
@@ -426,7 +429,7 @@ discard block |
||
| 426 | 429 | } |
| 427 | 430 | |
| 428 | 431 | /** |
| 429 | - * @return \PHPUnit_Framework_MockObject_MockObject|AuthenticationFailureHandlerInterface |
|
| 432 | + * @return AuthenticationFailureHandlerInterface |
|
| 430 | 433 | */ |
| 431 | 434 | private function createAuthenticationFailureHandlerMock() |
| 432 | 435 | { |