Identity/Features/NativeSignInToWebsite: Difference between revisions

add descriptions of observer notifications
(style null)
(add descriptions of observer notifications)
Line 28: Line 28:
<th>Topic
<th>Topic
<th>Data
<th>Data
<th>Action to take
<th>Description
</tr>
</tr>
<tr>
<tr>
<td><pre>
<td><pre>
Line 35: Line 36:
   rpId: 999,
   rpId: 999,
   origin: "https://www.example.com",
   origin: "https://www.example.com",
  // Properties below may not be provided:
  privacyPolicy: "https://www.example.com/pp",
  termsOfService: "https://www.example.com/tos",
}</pre></td>
}</pre></td>
<td>identity-request
<td>identity-request</td>
<td><pre>null</pre>
<td><pre>null</pre></td>
<td>The user has requested to login to the site with the given origin on the frame with outerWindowId = rpId.  Show an identity selector using <code>RP.getIdentitiesForSite(origin)</code> and provide a way to choose a new identity (requiring a valid email address).  The origin of the RP should be shown in the UI along with privacy policy and terms of service links (if URLS are provided).  Call <code>selectIdentity(rpId, identity)</code> with the identity the user selected. The should not close immediately upon identity selection as there may be errors which should be shown to the user (ie. NXDOMAIN).  Error delivery mechanism TBD soon.</td>
</tr>
 
<tr>
<tr>
<td><pre>
<td><pre>
Line 43: Line 50:
   provId: 999,
   provId: 999,
}</pre></td>
}</pre></td>
<td>identity-auth
<td>identity-auth</td>
<td>''Authentication URI''
<td>https://www.example.com/auth (''Authentication URI'')</td>
<td>The user needs to authenticate with their IDP. Open UI with a content frame displaying the content at the authentication URI so that the user can authenticate with their IDP.  The origin and any security indicators (ie. mixed content) should be present.  <code>IDP.setAuthenticationFlow(outerWinId, provId)</code> must be called with the outerWindowId (= the authentication ID) for the frame before starting to load the authentication URL so that the DOM API knows that calls from that frame are for the authentication flow. That is: open the frame, call <code>setAuthenticationFlow</code>, then load the URI in that frame.</td>
</tr>
 
<tr>
<tr>
<td><pre>null</pre>
<td><pre>null</pre></td>
<td>identity-auth-complete
<td>identity-auth-complete</td>
<td>''Authentication ID''
<td>''Authentication ID''</td>
<td>Authentication (initiated from identity-auth) is now complete. Destroy the frame created to display the authentication page.</td>
</tr>
 
<tr>
<tr>
<td><pre>
<td><pre>
Line 54: Line 67:
   rpId: 999,
   rpId: 999,
}</pre></td>
}</pre></td>
<td>identity-login-state-changed
<td>identity-login-state-changed</td>
<td>The identity (ie. user@example.com) for the specified origin or null if the user logged out.
<td>The identity (ie. user@example.com) for the specified origin or null if the user logged out.</td>
<td>If data is provided, the user is now logged in as that identity:
* Remove any request UI (leftover from an incomplete <code>identity-request</code>
* Show UI indicating that the user is logged into the website with the given rpId.  UI to logout via <code>RP.logout(rpId)</code> may also be provided.
 
Otherwise, the user has logged out:
* Update UI to reflect the logged out state.
</td>
</tr>
</tr>
</table>
</table>
Confirmed users
933

edits