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

Add Authentication and Authorization #38

Open
tertek opened this issue May 30, 2024 · 1 comment
Open

Add Authentication and Authorization #38

tertek opened this issue May 30, 2024 · 1 comment

Comments

@tertek
Copy link
Contributor

tertek commented May 30, 2024

Auth Specification:

Authentication will be based on Username and Password.
Authorization will be based on Role-Based Access Control (RBAC), see SlimBook Vol.3, p. 55.

We will use different authorization implementations, depending on the route types:

Session based authorization for front-end routes, such as user pages.
JWT stateless authorization for protected API routes.

@tertek
Copy link
Contributor Author

tertek commented May 30, 2024

  • Setup "user" database (we will rename it from customers, since we are using a role based authorization model with roles "admin", "internal" and "customer").

    • replace 'customer' with 'user'
    • update seeders to use password hash and user roles
  • Setup Authentication Routes and Actions/Services

  • Setup Session middleware to authorize frontend routes, such as customer/admin routes

  • Setup JWT middleware and token creation route and/or token management frontend

  • Setup protected API routes and implement business logic

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

1 participant