[dancer-users] route handler for a URL that matches a token

Richard Reina gatorreina at gmail.com
Wed Sep 16 22:26:54 BST 2015


Forgive me for being clueless, but can someone tell me how I can have route
handler for a URL that matches a token. Such that a user can receive an
email that says:

Go here to reset your password
http://myapp.com/resetJiOk49ld9oekdisJkflSS3ed (where
JiOk49ld9oekdisJkflSS3ed is the token ) and then dancer would bring them to
the template where they can reset their password.

I can't seem to wrap my mind around how such a thing would work.

get '/reset/'$token => sub {

   template 'pass_reset';

}

post '/reset/'$token => sub { # let user reset password

   my $input_hash = {

       Pswd => param('password1'),
       PswdConfirm => param('password2'),

   };

template 'pass_reset';

};

Any help would be greatly appreciated.

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20150916/b4d5beea/attachment.html>


More information about the dancer-users mailing list