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

As a student, I should be able to login, so that I can access the features of this app #28

Closed
arafaysaleem opened this issue Aug 24, 2021 · 0 comments · Fixed by #57
Closed
Labels
Status: Completed Type: Feature user story A brief explanation of a functionality or an interaction with the system, from a user's perspective

Comments

@arafaysaleem
Copy link
Collaborator

arafaysaleem commented Aug 24, 2021

Summary

As a student, I should be able to login, so that I can access the features of this app

Acceptance Criteria

GIVEN a student is logging in in the app
WHEN the app hits the auth/login endpoint with a valid POST request, containing:

  • student_erp/email
  • password

THEN the app should receive a status 200
AND in the response, the following information should be returned:

  • headers
  • student profile
  • authorization token

Sample Request/Sample Response

headers: {
    error: 0,
    message: "..."
}
body: {
    first_name: "...",
    ...
    token: '...'
}

Resources

  • Development URL: [Here goes a URL to the feature on development API];
  • Production URL: [Here goes a URL to the feature on production API];

Dev Notes

[Some complementary notes if necessary:]

  • The response should omit the password from the profile
  • The response should contain joined values for the foreign key fields

Testing Notes

Scenario: Login request is successful

  1. Get a student profile with a POST request to /auth/login endpoint.
  2. Ensure a 200 status code is returned.
  3. Ensure the response contains a student profile with the correct information i.e. matching the initially sent body.

Scenario: Login request is unsuccessful

  1. Request a student profile with a POST request to /auth/login endpoint containing an unknown erp.
  2. Ensure a 401 status code is returned.
  3. And the response headers' code parameter should contain an error pointing out incorrect credentials.

Scenario: Login request is incorrect

  1. Send a POST request to /auth/login endpoint with an incorrect key name in the body.
  2. Ensure a 422 status code is returned
  3. And the response headers' code parameter should contain an error pointing out failed validation.
@arafaysaleem arafaysaleem added user story A brief explanation of a functionality or an interaction with the system, from a user's perspective Priority: High Status: Pending Type: Feature labels Aug 24, 2021
@arafaysaleem arafaysaleem mentioned this issue Aug 25, 2021
11 tasks
@arafaysaleem arafaysaleem mentioned this issue Aug 26, 2021
12 tasks
@arafaysaleem arafaysaleem linked a pull request Aug 26, 2021 that will close this issue
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Completed Type: Feature user story A brief explanation of a functionality or an interaction with the system, from a user's perspective
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant