Skip to content
SWE-teamPublic

About

No description or website provided.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

Repository files navigation

login-rest-api

It is a rest api for sign in and sign up students and faculties.

Register Faculty

POST /faculty/register

JSON Payload

   {
      email: your_email,
      password: your_password,
      name: your_name
   }
  

Return Values

Success

Status 200

A verification email is sent to the faculty with a verification link. Once faculty click the link, Faculty is successfully regiisterd. He/She can continuue to login.

JSON Payload

   {
      err: false,
      msg: success_message,
   }
  

Status 400

  1. email entered is not of iiitr domnain or iith domain,
  2. password length is less than 8
  3. email entered is already entered associated with another account

JSON Payload

   {
      err: true,
      msg: error_message,
   }
  

Status 500

  1. server or database error
   {
      err: true,
      msg: error_message,
   }
  

Register Student

POST /student/register

JSON Payload

   {
      email: your_email,
      password: your_password,
      name: your_name,
      yearOfStudying: your_year_of_studying
   }
  

Return Values

Success

Status 200

A verification email is sent to the student with a verification link. Once student click the link, Student is successfully regiisterd. He/She can continuue to login.

JSON Payload

   {
      err: false,
      msg: success_message,
   }
  

Status 400

  1. email entered is not of iiitr domnain or iith domain,
  2. password length is less than 8
  3. email entered is already entered associated with another account

JSON Payload

   {
      err: true,
      msg: error_message,
   }
  

Status 500

  1. server or database error
   {
      err: true,
      msg: error_message,
   }
  

Login Faculty

POST /faculty/login

JSON Payload

   {
      email: your_email,
      password: your_password,
   }
  

Return Values

Success

Status 200

Faculty is succesfully logged in.

JSON Payload

   {
      err: false,
      msg: db_user_id,
   }
  

Status 400

  1. email entered is not registerd
  2. email entered is not verified
  3. Invalid Password

JSON Payload

   {
      err: true,
      msg: error_message,
   }
  

Status 500

  1. server or database error
   {
      err: true,
      msg: error_message,
   }
  

Login Student

POST /student/login

JSON Payload

   {
      email: your_email,
      password: your_password,
   }
  

Return Values

Success

Status 200

Student is succesfully logged in.

JSON Payload

   {
      err: false,
      msg: db_user_id,
   }
  

Status 400

  1. email entered is not registerd
  2. email entered is not verified
  3. Invalid Password

JSON Payload

   {
      err: true,
      msg: error_message,
   }
  

Status 500

  1. server or database error
   {
      err: true,
      msg: error_message,
   }
  

Forget Password

POST /faculty/resetPassword

JSON Payload

   {
      email: your_email,
      password: your_new_password,
   }
  

Return Values

Success

Status 200

A verification email is sent to the Faculty with a verification link. Once Faculty click the link, password is successfully changed. He/She can continuue to login.

JSON Payload

   {
      err: false,
      msg: success_message,
   }
  

Status 400

  1. email entered is not registerd

JSON Payload

   {
      err: true,
      msg: error_message,
   }
  

Status 500

  1. server or database error
   {
      err: true,
      msg: error_message,
   }
  

Forget Password

POST /student/resetPassword

JSON Payload

   {
      email: your_email,
      password: your_new_password,
   }
  

Return Values

Success

Status 200

A verification email is sent to the Student with a verification link. Once Student click the link, password is successfully changed. He/She can continuue to login.

JSON Payload

   {
      err: false,
      msg: success_message,
   }
  

Status 400

  1. email entered is not registerd

JSON Payload

   {
      err: true,
      msg: error_message,
   }
  

Status 500

  1. server or database error
   {
      err: true,
      msg: error_message,
   }
  

`

About

No description or website provided.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages