Goldilocks API Prototype

Hey all,

I wrote a little shim that hacks the Observer API to behave like the 
Goldilocks proposal. Just include it on your page after include.js and 
everything should work:

https://gist.github.com/callahad/6807882

Give it a shot and see if it makes your code feel meaningfully cleaner. 
Does anything break?

Thanks,
-Dan

0
Dan
10/3/2013 10:28:49 AM
mozilla.dev.identity 1643 articles. 4 followers. Post Follow

2 Replies
339 Views

Similar Articles

[PageSpeed] 17

On 03/10/2013 11:28, Dan Callahan wrote:
> I wrote a little shim that hacks the Observer API to behave like the
> Goldilocks proposal. Just include it on your page after include.js and
> everything should work:
> 
> https://gist.github.com/callahad/6807882
> 
> Give it a shot and see if it makes your code feel meaningfully cleaner.
> Does anything break?

This certainly makes it easier for us to not need a Persona session when
we have a server session as well. AFAICT it didn't break anything, I've
generated a PR for our repo, waiting for it to be pushed out.


Are you considering implementing this as an API in future? or
alternately what plans are there for something like this?

Thanks
Mark.
0
Mark
10/10/2013 10:57:28 AM
Current pull request for something like this is here:
https://github.com/mozilla/browserid/pull/3961


On Thu, Oct 10, 2013 at 3:57 AM, Mark Banner <mbanner@mozilla.com> wrote:

> On 03/10/2013 11:28, Dan Callahan wrote:
> > I wrote a little shim that hacks the Observer API to behave like the
> > Goldilocks proposal. Just include it on your page after include.js and
> > everything should work:
> >
> > https://gist.github.com/callahad/6807882
> >
> > Give it a shot and see if it makes your code feel meaningfully cleaner.
> > Does anything break?
>
> This certainly makes it easier for us to not need a Persona session when
> we have a server session as well. AFAICT it didn't break anything, I've
> generated a PR for our repo, waiting for it to be pushed out.
>
>
> Are you considering implementing this as an API in future? or
> alternately what plans are there for something like this?
>
> Thanks
> Mark.
> _______________________________________________
> dev-identity mailing list
> dev-identity@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-identity
>
0
Sean
10/11/2013 12:20:47 AM
Reply:

Similar Artilces:

The Goldilocks API
The Get API did too little. By introducing always-on session management, the Observer API did too much. Nevertheless, we *must* standardize on something to unblock various native efforts. Rather than take another stab in the dark, let's buy ourselves time by standardizing on a basic, v1 API that doesn't do session management. Something that behaves like the much-beloved .get(), but mitigates its one flaw by registering the login callback somewhere accessible to the browser. In this way we could close the loop, support redirect-based loginflows, and handle chrome-in...

Goldilocks API?
Was the Goldilocks API ever published? At the moment I've got a situation where occasionally my own login cookies let the user in, and then a few seconds later Persona says "Oh no you're not!" and effectively forces a logout. If I remember correctly the API was going to let you run in a mode where we could use our own method to maintain login status, and just call Persona whenever we needed to log in. Thanks, Andy On Sunday, March 15, 2015 at 9:47:07 AM UTC-7, Andrew Ducker wrote: > Was the Goldilocks API ever published? > > At the moment I've g...

Web APIs documentation/dev team/dev evangelism meeting Thursday at 8 AM PDT
The Web API documentation community meeting, with representatives from the technical evangelism and the API development teams, will take place on Thursday at 8 AM Pacific DAYLIGHT Time (see http://bit.ly/1GghwBR for your time zone). Please note that the United States has not yet transitioned to Daylight Saving Time, so this meeting may be offset by an hour from its usual start in your area. Typical meetings include news about recent API development progress and future development plans, discussions about what the priorities for documenting and promoting new Web technologies should be...

Web APIs documentation/dev team/dev evangelism meeting Thursday at 8 AM PDT
The Web API documentation community meeting, with representatives from the technical evangelism and the API development teams, will take place on Thursday at 8 AM Pacific DAYLIGHT Time (see http://bit.ly/1GghwBR for your time zone). Please note that the United States has not yet transitioned to Daylight Saving Time, so this meeting may be offset by an hour from its usual start in your area. Typical meetings include news about recent API development progress and future development plans, discussions about what the priorities for documenting and promoting new Web technologies should be...

DOM API for identity
Mozilla is working on a verified-email based identity service = (browserid). I would like to propose a companion DOM API that allows exposing browserid and other = identity services to content in a way that is straight forward and interoperable. = In particular I want to make sure that existing services that have a notion of = identity can easily participate in the DOM API, without having to subscribe to Mozilla's = particular identity philosophy/service/protocol design. Such a neutral API should be much = easier to standardize than a specific protocol. navigator.identity....

No prototype and a prototype of @ should not conflict?
I have a rewrite of autouse.pm. It passes autouse.t. But a small problem. For reasons I don't really understand, I am tripping a warning because a prototype on a function is being changed from non-existent to @. I have not tracked down why the prototype is being changed, but it seems to me that since a standard function is assumed to have a prototype of @, redefining a function so that the prototype changes between @ and nothing should not trigger a warning? Is there any chance of seeing that change? Thanks, Ben ...

Goldilocks: Declarative HTML API?
tl;dr - See title. See some code[1]. Now keep reading, so you can comment. We're getting out of the state management business. We've done part of that with current Goldilocks work, but it's not completed. We still have a few loose ends: 1. To support native Persona buttons in browser chrome, all options to request() need to be moved to watch(), so the browser can know them. 2. We still don't work for users that have to do email verification in Safari, since once they come back from closing a tab, we'll still be 3rd party. Since everything needs to be declared...

Identical twins not identical
From the Vancouver Sun: http://www.vancouversun.com/health/Identical+twins+actually+identical+shocking+Canadian+research+finds/4530930/story.html Here's the text: "If you thought identical twins were identical, think again. Canadian scientists have discovered that identical twins do not have identical genes, a common assumption by researchers for more than a century, and a development that could have implications into the study of medicine and human behaviour. "That assumption has been with us since the beginning of time," said Shiva Singh, a molecular...

[api-dev] Close a document
Hello, I open a document with php (LoadComponentFromURL). When I try to close it with $o_Doc->dispose, it does nothing... Any help? Fred Rem I am a beginner so please try to be as simple as required by the problem. Thks ...

Powerbuilder API prototype for GetFileSize()
Anyone have the pb api prototype for the GetFileSize() Kernel32.dll win95 api call ? I used pb's prototyping doc and have arrived at Function Ulong GetFileSize(Ulong hFile, Ref Ulong lpdwFileSizeHigh) Library "Kernel32.dll" When i use the following test button and script to use it, the value returned is pretty large .. for instance the return value is : 4294967295 Hmm I have a feeling im missing something on this,.. Any help is appreciated... // Sample code below.... // Test button ulong lu_FileSize Script lu_FileSize = gf_filesize("C:\TEST...

Merging dev-gaia and dev-b2g into dev-fxos
--001a113ce93ebce35d051e4c0c73 Content-Type: text/plain; charset=UTF-8 Hello people of Firefox OS, After a discussion we have decided that the distinction between dev-gaia and dev-b2g mailing lists is not enough to warrant maintaining two lists. So we are deprecating both in favor of dev-fxos. So if you are subscribed to one of the aforementioned lists, you will be subscribed to the new dev-fxos list and we will shortly be decommissioning dev-gaia and dev-b2g. Thanks! Michael --001a113ce93ebce35d051e4c0c73 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: qu...

Merging dev-gaia and dev-b2g into dev-fxos
--001a113ce93ebce35d051e4c0c73 Content-Type: text/plain; charset=UTF-8 Hello people of Firefox OS, After a discussion we have decided that the distinction between dev-gaia and dev-b2g mailing lists is not enough to warrant maintaining two lists. So we are deprecating both in favor of dev-fxos. So if you are subscribed to one of the aforementioned lists, you will be subscribed to the new dev-fxos list and we will shortly be decommissioning dev-gaia and dev-b2g. Thanks! Michael --001a113ce93ebce35d051e4c0c73 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: qu...

[api-dev] Modifying a document from OLE
Hello, I want to modify an existing Writer document and close OpenOffice after do it. From PowerBuilder I wrote: oleobject objServiceManager, objDesktop, objDocument, objText, objCursor objServiceManager = create oleobject if objServiceManager.ConnectToNewObject("com.sun.star.ServiceManager") <> 0 then Messagebox("Error", "ConnectToOleObject") return end if objDesktop = objServiceManager.createInstance("com.sun.star.frame.Desktop") string args[],save_args[] objDocument = objDesktop.loadComponentFromUrl("file:///C|/...

identity manager form script api
Hi, I was trying to hook custom validation script in novell imanager page(custom pages created through imanager plug in studio).Do we need to import some java packages in jsp page in order to use the IDM form script api?I found out details regarding the form script api in " 'Cool Solutions: Identity Manager Form Script API' (http://www.novell.com/coolsolutions/appnote/19307.html) " .On trying out with the methods in API i get error saying these methods aren't valid. Thanks in advance. -- sreejithvr --------------------------------------------------...

Web resources about - Goldilocks API Prototype - mozilla.dev.identity

Goldilocks principle - Wikipedia, the free encyclopedia
The Goldilocks principle states that something must fall within certain margins, as opposed to reaching extremes. When the effects of the principle ...

Goldilocks (@Goldishocks) on Twitter
Sign in Sign up To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content, tailor ...

Goldilocks and the Three Bears Lite - Children'... on the App Store on iTunes
Get Goldilocks and the Three Bears Lite - Children'... on the App Store. See screenshots and ratings, and read customer reviews.

Natalie Batalha - Kepler: A Planet for Goldilocks - YouTube
NASA AMES astrophysicist Natalie Batalha shares findings from the Kepler Mission, where she is mission scientist, and discusses its importance ...

Goldilocks from Ickle Pickle Productions is quirky and entertaining
Ickle Pickle's 10th-anniversary production of its first show is enjoyable school holiday entertainment. Goldilocks . By Peter McDonald. Music ...

NASA's Kepler Space Telescope finds new planets in the 'Goldilocks zone'
The newly discovered planets are neither too close to their star, where water would heat up and boil off, nor too far away, where they would ...

Couple returns to find 'Goldilocks' burglar in their bed
An elderly English couple returned home to find a "Goldilocks" intruder asleep in their bed and his underwear hanging out to dry.

Sun-like star found to have an Earth-like planet in its Goldilocks zone
For the first time a&nbsp;near-Earth-sized planet has been found orbiting a star that is very much like our own sun.

'Goldilocks' planet lost in translation
Missing planet An Earth-like planet orbiting a star 20 light-years away may not exist after all, according to a new study. In September last ...

Goldilocks Planet
NASA scientists have discovered the first truly Earthlike planet - just the right size and temperature.

Resources last updated: 11/21/2015 12:04:14 PM