Closed Bug 971762 Opened 11 years ago Closed 11 years ago

Add new authenticate/create API to login

Categories

(Webmaker Graveyard :: Login, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jon, Assigned: jon)

References

Details

(Whiteboard: login2-sprint)

Attachments

(1 file)

As part of the login refresh, we need to add two new API routes to the login server: /api/user/authenticate: Accepts a JSON payload consisting of a Persona assertion, and a Persona audience. If the audience is in the whitelist, then go and verify the assertion. If the assertion is valid and returns an email address then look it up in the database. If the user is in the database, then return the user's info. In all other cases, return a JSON payload with the "error" key set to something English-readable and actionable. /api/user/create: Accepts a JSON payload consisting of a Persona assertion, a Persona audience, and a username. If the If the audience is in the whitelist, then go and verify the assertion. If the assertion is valid and returns an email address then create the user and returns the newly created users info. In all other cases, return a JSON payload with the "error" key set to something English-readable and actionable.
Cade added some comments that need fixing up
Attachment #8374879 - Flags: review-
Kate noted that it would probably make sense to do the BSD form submission inside the login server, rather than the front-end code.
Attachment #8374879 - Flags: review- → review?(cade)
Attachment #8374879 - Flags: review?(cade) → review+
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: login2
Whiteboard: login2 → login2-phase1
Whiteboard: login2-phase1 → login2-sprint
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: