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

Non Admin User API Implementation #6

Merged
merged 7 commits into from Jun 18, 2018
Merged

Non Admin User API Implementation #6

merged 7 commits into from Jun 18, 2018

Conversation

csoni111
Copy link
Member

@csoni111 csoni111 commented Jun 7, 2018

New Additions:

  1. A new authentication api:
    • POST /auth expects JSON type data with pin key in request body.
  2. User authentication and authorization check before serving on /shares and /files api.
    • GET /shares -> checks if Authorization header is present and returns a list of only those shares that are accessible to that user with an extra key isWritable (bool value) in the json response for each share.
    • GET /files -> checks for read access of that user on that share
    • DELETE and POST /files -> checks for write access of that user on that share.
    • If Authorization header is not preset then returns 401 Unauthorized
    • If read/write access is false then returns 403 Forbidden

TODO

  • Recheck from db and invalidate user session if last_modified has changed after a certain time interval.
  • Fetch value for isWritable key from db.

@cpg
Copy link
Member

cpg commented Jun 8, 2018

I think we are using underscore_names for fields.

@csoni111
Copy link
Member Author

csoni111 commented Jun 9, 2018

I will update the field and function names soon.

@cpg
Copy link
Member

cpg commented Jun 12, 2018

great going. next we need a PR for the docs, then we can deploy with one client.

We'd like to ask for help in prototyping this first version of non-admin users from @octacode (and/or @ARIHANTJAIN456 and @megabitdragon), and perhaps @codedentwickler. Depending on their schedule, we can do one or the other.

We need a separate "PIN login" page in the client to allow access to NAUs. We can provide a custom-built AA servers to test with.

@cpg
Copy link
Member

cpg commented Jun 14, 2018

I did not realize that other PR would cause a conflict here.

@cpg cpg merged commit d622e7e into amahi:master Jun 18, 2018
@csoni111 csoni111 added this to Done in Non Admin User login Aug 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants