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

Authentication #1

Closed
thetutlage opened this issue Mar 9, 2016 · 2 comments
Closed

Authentication #1

thetutlage opened this issue Mar 9, 2016 · 2 comments
Assignees

Comments

@thetutlage
Copy link
Member

@dubcanada commented on Wed Feb 24 2016

Hello,

I am in need of the Authentication provider, so I figured rather then just build one for myself I would build it and contribute it back. I was reading the Trello card for the Authentication https://trello.com/c/wns5DzT3/28-authentication-provider

Are you wanting to separate it out into it's own repo like you did with the mail provider https://github.com/adonisjs/adonis-mail ? I plan on copying that to start with as that has your driver structure done.

I'm going to start tomorrow, so I'll probably send a pr before the end of this week. At least for basic/session, JWT may take a bit more as I don't need that atm.

Thanks!


@thetutlage commented on Wed Feb 24 2016

@dubcanada Nice, it will be great to have initial authentication system for Adonis. I am not sure if i would be able to make it the official Auth provider, because the actual one i have in my mind is quite complex. Here is a brief.

  1. Authentication system will have UserProviders, whose job will be to validate credentials. Now these can be username,password or can be a token. UserProvider has no idea where the credentials will come from.
  2. There will be multiple schemes like session, basic-auth. Now these scheme knows where to look for credentials.
  3. Finally there will a driver which will read credentials from schemes and will validate them with the UserProviders.

Also there will be mechanism for guest logins, which means you can dummy login visitors and once they signup, you can simply join their guest tokens with their user profile. It will be helpful to know what a visitor did before becoming a user.

Obviously you are not bound to implement all these things. But it will be great if you can come up with a normal authentication provider to help others until i come up with the fully fledged one.


@dubcanada commented on Tue Mar 01 2016

I'll do a basic one for session and basic-auth drivers and leave it at that. I'll try and copy how you do things currently along with the Laravel auth provider and see how it turns out. Hopefully it will work until you do the larger version with JWT and such.


@thetutlage commented on Tue Mar 01 2016

👍

@dubcanada
Copy link

Cool I'll pr it here, I am still working on it.

@thetutlage
Copy link
Member Author

Closing as it has been done

@thetutlage thetutlage self-assigned this May 3, 2016
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

No branches or pull requests

2 participants