Confirmed users
170
edits
No edit summary |
(Add deprecation notice; point to BrowserID) |
||
(6 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
{| class="fullwidth-table" | |||
|- | |||
| '''Note: The Verified Email Protocol has been deprecated. Please check the [[Identity/BrowserID|BrowserID]] protocol.''' | |||
|} | |||
= Warning = | = Warning = | ||
Line 43: | Line 48: | ||
[Constructor] | [Constructor] | ||
interface Session { | interface Session { | ||
attribute string | attribute string email; | ||
attribute string status; | attribute string status; | ||
attribute object bound_to; | attribute object bound_to; | ||
} | } | ||
* | * email:string, required. Identifier/email address the session is associated with | ||
* status: string, optional. The status may be "active", representing a "logged in" state, or "passive", representing a tracking session without an active log-in. The status field is optional, and defaults to "active". | * status: string, optional. The status may be "active", representing a "logged in" state, or "passive", representing a tracking session without an active log-in. The status field is optional, and defaults to "active". | ||
* bound_to: object, optional. An object holding binding information: | * bound_to: object, optional. An object holding binding information: | ||
Line 69: | Line 74: | ||
// Every page within domain must redeclare navigator.id.sessions | // Every page within domain must redeclare navigator.id.sessions | ||
navigator.id.sessions = [{ | navigator.id.sessions = [{ | ||
email: 'poohbear@ashdownforest.gov.uk' | |||
}]; | }]; | ||
Line 75: | Line 80: | ||
// No other page within domain needs to declare navigator.id.sessions | // No other page within domain needs to declare navigator.id.sessions | ||
navigator.id.sessions = [{ | navigator.id.sessions = [{ | ||
email: 'yogibear@jellystone.nps.gov', | |||
bound_to: { | bound_to: { | ||
type: 'cookie', | type: 'cookie', | ||
Line 81: | Line 86: | ||
} | } | ||
}]; | }]; | ||
===Session Redeclaration=== | ===Session Redeclaration=== | ||
Line 91: | Line 95: | ||
If neither are available, the browser will assume both that the session information has expired and the page does not support the session API - it will remove the session status indicator. | If neither are available, the browser will assume both that the session information has expired and the page does not support the session API - it will remove the session status indicator. | ||
===Multiple Sessions=== | ===Multiple Sessions - NOT YET SUPPORTED === | ||
Multiple sessions can be declared in navigator.id.sessions, there can be 0 or 1 active sessions. An example of where this could be used is with Google's multiple session support. If more than one session is declared "active" only the first will be used. | Multiple sessions can be declared in navigator.id.sessions, there can be 0 or 1 active sessions. An example of where this could be used is with Google's multiple session support. If more than one session is declared "active" only the first will be used. | ||
Line 97: | Line 101: | ||
// Our bear is masquerading as two bears. | // Our bear is masquerading as two bears. | ||
navigator.id.sessions = [{ | navigator.id.sessions = [{ | ||
email: 'poohbear@ashdownforest.gov.uk' | |||
}, { | }, { | ||
email: 'yogibear@jellystone.nps.gov', | |||
}]; | }]; | ||
Line 105: | Line 109: | ||
// Our bear is masquerading as two bears. | // Our bear is masquerading as two bears. | ||
navigator.id.sessions = [{ | navigator.id.sessions = [{ | ||
email: 'poohbear@ashdownforest.gov.uk', | |||
status: 'active' | status: 'active' | ||
}, { | }, { | ||
email: 'yogibear@jellystone.nps.gov', | |||
}]; | }]; | ||
If 0 sessions are currently active, the browser status button will read "login". When the user clicks the button, they will be presented a the doorhanger to select a session. When the user selects a session, the "login" event will be triggered with the selected id given as the "id" field of the event object. | If 0 sessions are currently active, the browser status button will read "login". When the user clicks the button, they will be presented a the doorhanger to select a session. When the user selects a session, the "login" event will be triggered with the selected id given as the "id" field of the event object. | ||
===Changing Sessions - NOT YET SUPPORTED === | |||
===Changing Sessions=== | |||
;This needs hammered out, how is this going to work? | ;This needs hammered out, how is this going to work? |