-
Notifications
You must be signed in to change notification settings - Fork 0
User authentication guardian #11
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
base: master
Are you sure you want to change the base?
Conversation
lib/phoaw/auth/pipeline.ex
Outdated
| """ | ||
|
|
||
| use Guardian.Plug.Pipeline, | ||
| otp_app: :auth_ex, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we using :phoaw ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes we should
| "test", | ||
| "lib/phoaw/application.ex", | ||
| "lib/phoaw_web.ex", | ||
| "lib/phoaw_web/views/error_helpers.ex" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why skip this files?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't use this file yet, so we didn't have test for this file
lib/phoaw/auth/auth.ex
Outdated
| alias Phoaw.Contents.User | ||
|
|
||
| def authenticate_user(username, plain_text_password) do | ||
| user = Repo.one(from u in User, where: u.username == ^username) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add method in Contents like:
Contents.find_user_by(email: 'test@example.com')
or
Contents.find_user_by_email('test@example.com')
What's this PR do ?
user authentication using Guardian
What are the relevant tickets ?
#6
Where should the reviewer start ?
session_controller.exHow should this be manually tested ?
/sessions/new/usersAny background context you want to provide ?
Deployment notes
Screenshots (if appropriate)
Definition of Done:
Guardian