Returns the internal arguments of the request, that is, all arguments whose
name starts with two underscores.
public getInternalArguments ( ) : array | ||
return | array |
/** * Updates the password credential from the POST vars, if the POST parameters * are available. Sets the authentication status to AUTHENTICATION_NEEDED, if credentials have been sent. * * Note: You need to send the password in this POST parameter: * __authentication[TYPO3][Flow][Security][Authentication][Token][PasswordToken][password] * * @param ActionRequest $actionRequest The current action request * @return void */ public function updateCredentials(ActionRequest $actionRequest) { if ($actionRequest->getHttpRequest()->getMethod() !== 'POST') { return; } $postArguments = $actionRequest->getInternalArguments(); $password = ObjectAccess::getPropertyPath($postArguments, '__authentication.TYPO3.Flow.Security.Authentication.Token.PasswordToken.password'); if (!empty($password)) { $this->credentials['password'] = $password; $this->setAuthenticationStatus(self::AUTHENTICATION_NEEDED); } }
/** * @test */ public function internalArgumentsOfActionRequestOverruleThoseOfTheHttpRequest() { $this->actionRequest->setArguments(['__internalArgument' => 'action request']); $expectedResult = ['__internalArgument' => 'action request']; $this->assertSame($expectedResult, $this->actionRequest->getInternalArguments()); }