Register
Submit a solution
The challenge is finished.

Challenge Overview

This challenge is part of the HPE Live Blitz Challenge Series. Make sure to check it out!

The goal of this challenge is to integrate the ionic app with Login API.

Challenge Requirements

-Login API : https://www.oercommons.org/login

-HTTP Method : POST

-Fields :

- - login-username

- - login-password

Two possible responses :

- AJAX request, valid credentials: user is authenticated, "sessionid" cookie it set, JSON response with the following content is returned:
{"status": "success", "user_name": "NAME OF USER", "redirect_to": "SITE FRONTPAGE URL"}

- AJAX request, invalid credentials: JSON response with the following content:

{"status": "error", "error": {"FIELD NAME": "ERROR MESSAGE"}}
"errors" object may contain a special property "__all__" which is used for error messages that aren't related to a specific field.

On successful login the user should be redirected to educator dashboard. On failed login, user should be shown the error message with proper styling as currently done in the app.

Notes:

- A request is treated as AJAX if is contains X-Requested-With=XMLHttpRequest header

- All subsequent requests must use the same "sessionid" cookie value that was set after successful login, so you need to update the code to store this value to be used in future integration.

- User’s email may be used as a value of the “login-username” field
- Your solution must work on BOTH Android and iPhone devices, don't test only on web browsers.

Test user account to be used for development: hpetest/secret

UI Prototype

Provided in challenge forums.

 



Final Submission Guidelines

Deliverable

- Updated UI Prototype integrated with the API Login.

- Updated README file with instructions.

- Verification Document.

ELIGIBLE EVENTS:

2016 TopCoder(R) Open

Review style

Final Review

Community Review Board

Approval

User Sign-Off

ID: 30054704