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

Verify principal's e-mail address #23

Merged
merged 10 commits into from
Dec 22, 2014
Merged

Conversation

lshepstone
Copy link
Contributor

Introduces token authentication (not to be confused with HTTP Token Auth.) and a mechanism to mark a Principal as having a valid e-mail address when they follow a link in their confirmation e-mail that contains their personalised token.

Things to consider:

  • Language around the feature spec
  • Using the presence of last_sign_in_at on the Principal model to indicate e-mail verification
  • Request spec around some basic scenarios for authentication

@benlovell

@lshepstone lshepstone force-pushed the verify-principal-email branch 3 times, most recently from a688028 to 9b75c01 Compare December 22, 2014 10:38
def authenticate_token
@current_user = Principal.authenticate(params[:token]) do |principal|
session[:user_id] = principal.id
principal
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Principal should be the return value from authenticate so this can go away.

lshepstone added a commit that referenced this pull request Dec 22, 2014
@lshepstone lshepstone merged commit 12dec53 into master Dec 22, 2014
@lshepstone lshepstone deleted the verify-principal-email branch December 22, 2014 15:34
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 7d3d15e on verify-principal-email into * on master*.

JiggyPete pushed a commit that referenced this pull request Dec 13, 2016
…chable

Excludes non postcode searchable Firms
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

Successfully merging this pull request may close these issues.

None yet

3 participants