Password Reset spec and Database Table and related templates
This commit is contained in:
@ -57,6 +57,13 @@ sudo -u postgres psql -c "CREATE TABLE cryptoWallets(
|
|||||||
);
|
);
|
||||||
" cavecomm
|
" cavecomm
|
||||||
|
|
||||||
|
sudo -u postgres psql -c "CREATE TABLE passwordResetKeys(
|
||||||
|
freelancerEmail text PRIMARY KEY,
|
||||||
|
passwordResetKey text UNIQUE,
|
||||||
|
expiration timestamp
|
||||||
|
);
|
||||||
|
" cavecomm
|
||||||
|
|
||||||
sudo -u postgres psql -c "CREATE TABLE aliasRoutes(
|
sudo -u postgres psql -c "CREATE TABLE aliasRoutes(
|
||||||
aliasName text PRIMARY KEY,
|
aliasName text PRIMARY KEY,
|
||||||
freelancerID int,
|
freelancerID int,
|
||||||
|
@ -152,6 +152,14 @@ email + password
|
|||||||
clears secure cookie and removes session from DB
|
clears secure cookie and removes session from DB
|
||||||
+++ "/freelancer/signup"
|
+++ "/freelancer/signup"
|
||||||
creates user using a name, email and password while creating a salted hash of the password
|
creates user using a name, email and password while creating a salted hash of the password
|
||||||
|
++++ "/freelancer/login/passwordreset"
|
||||||
|
Freelancer can request a reset email to be sent to an email
|
||||||
|
|
||||||
|
passwordResetKeys
|
||||||
|
freelancerEmail text
|
||||||
|
passwordResetKey text
|
||||||
|
expiration timestamp - the time at which the resetkey is unusable.
|
||||||
|
|
||||||
|
|
||||||
### "/freelancer/profile"
|
### "/freelancer/profile"
|
||||||
Profile page collating freelancer pages.
|
Profile page collating freelancer pages.
|
||||||
@ -235,6 +243,7 @@ mandatory:
|
|||||||
databaseConnectionString={postgresql://{user}:{password}@{host}:{port}/{database}}
|
databaseConnectionString={postgresql://{user}:{password}@{host}:{port}/{database}}
|
||||||
sslCrtPath
|
sslCrtPath
|
||||||
sslKeyPath
|
sslKeyPath
|
||||||
|
domain
|
||||||
|
|
||||||
|
|
||||||
optional:{default}
|
optional:{default}
|
||||||
|
20
templates/passwordReset.html
Normal file
20
templates/passwordReset.html
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
{{> templateIncludes/style.css.html}}
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h2>{{freelanceremail}} Password Reset</h2>
|
||||||
|
<br>
|
||||||
|
<form action="/passwordreset/{{passwordresetkey}}/fulfilment" method="post">
|
||||||
|
<label for="freelancerpassword">Password: </label> <input type="password" id="freelancerpassword" name="freelancerpassword" value=""><br>
|
||||||
|
<button type="submit" class="button">Reset Password</button>
|
||||||
|
</form>
|
||||||
|
<br>
|
||||||
|
{{> templateIncludes/returnToIndexButton.html.html}}
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
42
templates/passwordReset_Fulfilment.html
Normal file
42
templates/passwordReset_Fulfilment.html
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
{{> templateIncludes/style.css.html}}
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
{{#RESET_SUCCESS}}
|
||||||
|
<h2>{{freelanceremail}}: password has been reset</h2>
|
||||||
|
{{> templateIncludes/freelancerLoginSignupProfileLogoutInterface.html.html}}
|
||||||
|
{{/RESET_SUCCESS}}
|
||||||
|
{{#REGISTRATION_ERROR_QUERY}}
|
||||||
|
<div>
|
||||||
|
The Password could not be Reset.
|
||||||
|
</div>
|
||||||
|
{{/REGISTRATION_ERROR_QUERY}}
|
||||||
|
{{#REGISTRATION_ERROR_CRITICAL}}
|
||||||
|
<div>
|
||||||
|
The Password could not be Reset: Critical
|
||||||
|
</div>
|
||||||
|
{{/REGISTRATION_ERROR_CRITICAL}}
|
||||||
|
{{#PASSWORD_EMPTY}}
|
||||||
|
<div>
|
||||||
|
No new password has been entered.
|
||||||
|
</div>
|
||||||
|
{{/PASSWORD_EMPTY}}
|
||||||
|
{{#PASSWORD_RESET_EXPIRED}}
|
||||||
|
<div>
|
||||||
|
The password request has expired.
|
||||||
|
</div>
|
||||||
|
{{/PASSWORD_RESET_EXPIRED}}
|
||||||
|
{{#PASSWORD_RESET_DOES_NOT_EXIST}}
|
||||||
|
<div>
|
||||||
|
The password request does not exist.
|
||||||
|
</div>
|
||||||
|
{{/PASSWORD_RESET_DOES_NOT_EXIST}}
|
||||||
|
{{> templateIncludes/returnToIndexButton.html.html}}
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Reference in New Issue
Block a user