This repository was archived by the owner on Dec 9, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Feature/email authorization #2
Open
Jassob
wants to merge
16
commits into
master
Choose a base branch
from
feature/email-authorization
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We need to store the verification code we send to users when they try to register so we can verify the codes.
Added option in default.conf for email requests.
Added hashmap of email requests to gitit state and functions that modify that part of the state.
Gitit now sends verification messages to the supplied email address. No handler for validating the links exists yet.
Added function for retrieving request code from HTTP paramters.
Added function for retrieving email verification requests from the request file.
Added some comments to my functions in Authentication.hs
When an account is requested a message is sent to the email of the user requesting the account. This message contains a link with a verification code that is needed to create the account. When that link is visited the newly created handlers compare the code with the one stored on the server and the user is free to create an account if they match.
Also added so email addresses must be either *@student.chalmers.se or *@dtek.se.
2785856
to
f4b3dcb
Compare
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I think this is good enough now.
However I would like to implement this as some kind of plugin or opt-in thingie.
Input on how to refactor it into a module is appreciated!