Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirect: can't add route params + backward compatibility #476

Closed
Colmea opened this issue Jun 27, 2014 · 7 comments
Closed

Redirect: can't add route params + backward compatibility #476

Colmea opened this issue Jun 27, 2014 · 7 comments

Comments

@Colmea
Copy link

Colmea commented Jun 27, 2014

Hey,
I have some issues with the new change made in the redirect feature (toURL->toRoute):

  1. It's not backward compatible and it breaks a lot of applications. Could we find a way to make this change backward compatible ?
  2. Since toRoute() method is used, you can't add route params anymore (->toRoute($route, $params) ). Shouldn't we add a $redirectParam var ?
  3. I understand your choice and the security vulnerability, but since redirect param is often a param fetch from an other variable, I think toURL is much more relevant than toRoute.
  4. Thank's for your work !
@ojhaujjwal
Copy link
Contributor

+1

@Danielss89
Copy link
Member

Currently working on implementing a callback so the user can decide all by himself what to do.

@Colmea
Copy link
Author

Colmea commented Jun 27, 2014

Ok thank you !

@Danielss89
Copy link
Member

Please take a look at #480

@Danielss89
Copy link
Member

I released v. 1.2.0 of ZfcUser which makes it possible to change the redirect callback. Check #487 for more info.

@Colmea
Copy link
Author

Colmea commented Jul 30, 2014

I don't know if this comment will reopen the issue, but I still don't understand how to pass route param with the new redirect strategy (with a route name) ?
Is it impossible with this strategy ? Is this feature could be implemented ?

@Ocramius
Copy link
Contributor

@Colmea you can define a credential callable. Here's a pseudo-code of how it works:

'factories' => [
    'credential_callable' => function ($sl) {
        $router = $sl->get('router');
        return function () use ($router) {
            return $router->assemble('my-route-name');
        };
    }
],

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants