public function updateCredentials(ActionRequest $actionRequest)
    {
        $this->credentials = ['username' => null, 'password' => null];
        $this->authenticationStatus = self::NO_CREDENTIALS_GIVEN;

        $authorizationHeader = $actionRequest->getHttpRequest()->getHeaders()->get('Authorization');
        if (strpos($authorizationHeader, 'Basic ') !== 0) {
            return;
        }

        $credentials = base64_decode(substr($authorizationHeader, 6));
        list($username, $password) = explode(':', $credentials, 2);
        $this->credentials['username'] = $username;
        $this->credentials['password'] = $password;
        $this->authenticationStatus = self::AUTHENTICATION_NEEDED;
    }