Services/Identity/InternalSpec: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 37: Line 37:
The Mozilla ID server MUST require an active session before executing any of the APIs described in this document.
The Mozilla ID server MUST require an active session before executing any of the APIs described in this document.


== API ==
== API ==


;logged_in
;logged_in


Is the user logged into Mozilla ID service (Is the Active_Session cookie valid)
Is the user logged into Mozilla ID service (Is the Active_Session cookie valid)  


* type: POST
*type: POST  
* SSL: required
*SSL: required  
* path: /1/logged_in
*path: /1/logged_in  
* parameters:
*parameters:  
** (none)
**(none)  
* returns:
*returns:  
** *SUCCESS* if there is an active session to the Mozilla ID server
***SUCCESS* if there is an active session to the Mozilla ID server  
** *LOGIN_ERROR* if there is no active session
***LOGIN_ERROR* if there is no active session


;get_default_email
;get_default_email


Returns the default email associated with this RP (if the user has previously done so).
Returns the default email associated with this RP (if the user has previously done so).  


* type: POST
*type: POST  
* SSL: required
*SSL: required  
* path: /1/get_default_email
*path: /1/get_default_email  
* parameters:
*parameters:  
** audience: RP
**audience: RP  
* returns:
*returns:  
** email string if there is an associated email
**email string if there is an associated email  
** ?? if there is no default email?
** ?? if there is no default email?  
** *LOGIN_ERROR* if there is no active session with the Mozilla ID server
***LOGIN_ERROR* if there is no active session with the Mozilla ID server


;get_emails
;get_emails


(TBD) returns a JSON block of all verified email addresses. If an audience is specified, also indicates which email may have been previously used with this site and which email is "preferred".
(TBD) returns a JSON block of all verified email addresses. If an audience is specified, also indicates which email may have been previously used with this site and which email is "preferred".  


* type: POST
*type: POST  
* SSL: required
*SSL: required  
* path: /1/get_emails
*path: /1/get_emails  
* parameters:
*parameters:  
** audience: RP
**audience: RP  
* returns:
*returns:  
** TBD
**TBD  
** *LOGIN_ERROR* if there is no active session with the Mozilla ID server
***LOGIN_ERROR* if there is no active session with the Mozilla ID server


;get_identity_assertion
;get_identity_assertion


Returns an ''identity assertion'' for the given audience and email. The client MUST ensure the user has consented to the disclosure of information to the RP before making this call. [[MozillaID/Spec]] for the format of identity assertions.
Returns an ''identity assertion'' for the given audience and email. The client MUST ensure the user has consented to the disclosure of information to the RP before making this call. [[MozillaID/Spec]] for the format of identity assertions.  


* type: POST
*type: POST  
* SSL: required
*SSL: required  
* path: /1/get_identity_assertion
*path: /1/get_identity_assertion  
* parameters:
*parameters:  
** audience: RP
**audience: RP  
** email: verified email to disclose
**email: verified email to disclose  
* returns:
*returns:  
** serialized identity assertion object
**serialized identity assertion object  
** *LOGIN_ERROR* if there is no active session with the Mozilla ID server
***LOGIN_ERROR* if there is no active session with the Mozilla ID server


;remove_association
;remove_association


Removes the "automatic" flag, requiring user to confirm access to the site, and specify the preferred email (if more than one is available)
Removes the "automatic" flag, requiring user to confirm access to the site, and specify the preferred email (if more than one is available)  


* type: POST
*type: POST  
* SSL: required
*SSL: required  
* path: /1/remove_association
*path: /1/remove_association  
* parameters:
*parameters:  
** audience: RP
**audience: RP  
* returns:
*returns:  
** *SUCCESS*
***SUCCESS*  
** *FAILURE*
***FAILURE*  
** *LOGIN_ERROR* if there is no active session with the Mozilla ID server
***LOGIN_ERROR* if there is no active session with the Mozilla ID server
 
 
[[Image:DataFlow.png|thumb|Data flow for most common data call]]


== Pages to be implemented ==
== Pages to be implemented ==
Confirmed users
1,021

edits