Change default intercepted URLs
authorMarius Gavrilescu <marius@ieval.ro>
Sun, 1 Mar 2015 10:55:29 +0000 (12:55 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Sun, 1 Mar 2015 10:55:29 +0000 (12:55 +0200)
lib/Plack/Middleware/Auth/Complex.pm

index 0f6759ddb24c1d5eb2e05d97e1b3c06d31a017d5..920810c2ffb392407b6d1975b12575c99310ecba 100644 (file)
@@ -28,10 +28,10 @@ sub default_opts {(
        realm             => 'restricted area',
        token_max_age     => 60 * 60 * 24,
        username_regex    => qr/^\w{2,20}$/a,
-       register_url      => '/register',
-       passwd_url        => '/passwd',
-       request_reset_url => '/request-reset',
-       reset_url         => '/reset'
+       register_url      => '/action/register',
+       passwd_url        => '/action/passwd',
+       request_reset_url => '/action/request-reset',
+       reset_url         => '/action/reset'
 )}
 
 sub new {
@@ -275,25 +275,25 @@ error and 500 for server errors. All parameters are mandatory.
 
 =over
 
-=item B<POST> /register?username=user&password=pw&confirm_password=pw&email=user@example.org
+=item B<POST> /action/register?username=user&password=pw&confirm_password=pw&email=user@example.org
 
 This URL creates a new user with the given username, password and
 email. The two passwords must match, the user must match
 C<username_regex> and the user must not already exist.
 
-=item B<POST> /passwd?password=oldpw&new_password=newpw&confirm_new_password=newpw
+=item B<POST> /action/passwd?password=oldpw&new_password=newpw&confirm_new_password=newpw
 
 This URL changes the password of a user. The user must be
 authenticated (otherwise the endpoint will return 401).
 
-=item B<POST> /request-reset?username=user
+=item B<POST> /action/request-reset?username=user
 
 This URL requests a password reset token for the given user. The token
 will be sent to the user's email address.
 
 A reset token in the default implementation is C<< base64(HMAC-SHA1("$username $passphrase $expiration_unix_time")) . ":$expiration_user_time" >>.
 
-=item B<POST> /reset?username=user&new_password=pw&confirm_new_password=pw&token=token
+=item B<POST> /action/reset?username=user&new_password=pw&confirm_new_password=pw&token=token
 
 This URL performs a password reset.
 
@@ -359,21 +359,21 @@ C<qr/^\w{2,20}$/a>.
 
 =item register_url
 
-URL for registering. Defaults to C<'/register'>.
+URL for registering. Defaults to C<'/action/register'>.
 
 =item passwd_url
 
-URL for changing your password. Defaults to C<'/passwd'>.
+URL for changing your password. Defaults to C<'/action/passwd'>.
 
 =item request_reset_url
 
 URL for requesting a password reset token by email. Defaults to
-C<'/request-reset'>.
+C<'/action/request-reset'>.
 
 =item reset_url
 
 URL for resetting your password with a reset token. Defaults to
-C<'/reset'>.
+C<'/action/reset'>.
 
 =back
 
This page took 0.013123 seconds and 4 git commands to generate.