Buildfire: Getting datastore and userdata information from a different plugins - datastore

I am trying to use buildfire.datastore and buildfire.userData.
Saving and using this info in one plugin.
Can I then reference that datastore and userData info in a different plugin?
If not, would the browsers localStorage work?

Plugins are not allowed to share data even among different instances of the same plugin. This is done for security reasons.
If your plugins share the same domain they can use the same local storage. However, if they do not share the same domain you can use the Shared LocalStorage in buildfire.js. See
https://github.com/BuildFire/sdk/wiki/LocalStorage
While BuildFire has on its roadmap a new database storage mechanism that will allow all plugins to share data. A good substitute for the would be using a service like Google's FireBase which works really well with BuildFire.
Hope this helps

Related

CLI/SDK to create Google-cloud oAuth client

Is it possible to create an OAuth client (https://developers.google.com/identity/protocols/OAuth2) using a script (gcloud or any library)?
Google recommended way (https://developers.google.com/identity/protocols/OAuth2WebServer#creatingcred) is to manually create from https://console.developers.google.com/apis/credentials.
I have multiple apps with different url_redirects like https://a.domain.com, https://b.domain.com https://c.domain.com, https://d.domain.com, this subdomain list is large to manage manually.
I want to automate this process for my use case. I'm not able to find any library to do this.
Update: Endpoint used by GCP console https://clientauthconfig.clients6.google.com/v1/clients and there is related permission also "clientauthconfig.clients.create" but there is no API provided for it.
You would need API client to create new API client anyway. Is it really necessary for you to create it this way? You can rather create multiple "user" credentials for your application using only that one API client.
I think you are looking for something like this, hope Java is good for you.
I've also found the following relevant information that might help you. Link
Also relevant for you. Link
Let me know.

Multiple deployment environments (production/staging/etc) and Facebook Apps

I'm looking for a "best practice" kind of answer with regard to Facebook Apps and staging/production environment. Instinctively, I've provided each environment with its own Facebook App, complete with its own ID and secret. It appears (here, here and through extensive Googling) that it's simply not possible to share OG configuration across apps, so I've been copying application settings across environments (icon, requested permissions and texts, etc). It's been a pain and ugly, but I've lived with it.
Alas, with the introduction of opengraph actions, this isn't funny anymore - much more to copy and everything has to go through the approval process. Is there no better way to do this? A coworker suggested we simply share the same app across all environments, but I'm apprehensive about that - it means we'll have to share production secrets with the staging environment (I'm not even talking about localhost development environments), and that we'll need to route Facebook traffic to the correct environment somehow (because one Facebook app means one Page Tab URL).
There has to be a better way... no?
I see there's a feature called "Test Apps" now that seems to fit the bill:
https://developers.facebook.com/docs/apps/test-apps/
Test Apps are like regular apps in that they have their own App ID and independent settings, but they offer a number of advantages for use during pre-production:
...
When creating test apps - the settings are copied from your production app so its simple to spinup new apps which mirror your production app's settings
It's working for me so far.
I asked practically the same question at a breakout session at F8 last year. Creating multiple apps is the best practice. They are aware that it is an inconvenience, especially with the open graph objects and actions. They did however mention the possibility of setting up apps in the future via the API, but I am still waiting for this. Until then, it's a manual process.

Considerations for using auto generated proxies for web services (Advantages and Disadvantages)

We are using a lot of manual code in .net (through HttpWebRequest) to access some web services. I was reading we do not need to do this as we can easily generate proxies. Has anyone converted from manual to auto-generated services. We do need to use some customized settings like UseProxyServer based on config settings and client certificates.
What are the considerations I need to take care of? Any helpful link is really appreciated.
Update (as pointed by John Saunders): Our web services are using WS-Security and hence the need to pass UsernameToken.
Anything you would have set "manually" can be set on the proxy class. You should use the proxy unless you have a specific reason not to. It will save you a great deal of time that you could spend solving other problems.

Can two different browser share one cookie?

My requirement is pretty interesting, I want to maintain one cookie between two different browser for same domain.
so lets say I have create one cookie with name "mydata" and value "hiscal" from IE, then if i browse same website from firefox and trying to read cookie "mydata" then system should give me value "hiscal"
but this is not happen in general case
so can any one tell me how i can share cookie between to different browser(client) of same domain.
Thanks,
Hiscal
You can build a cookie-proxy by creating a Flash application and use Shared Objects (SO = Flash cookies) to store data.
Any Browsers with Flash installed could retrieve the informations stored in the SO.
But, it's an ugly workaround.
Just don't share cookies... and find another way to build your website/app.
Every browser maintains it's own cookies. So in general, no this is not possible.
With a lot of hard work you could in theory write an application that sits on the client computer that looks at all the locations the different browsers store cookies, parses the different cookie formats, synchronises them and then writes them out.
That would be error prone and will break as soon as a browser changes how it works with cookies (not to mention that some of the browsers secure their cookies, so you won't be able to get to them in the first place).
In my opinion, this is not practical and I wouldn't even try.
Use YUI's storage utility and force it to use the SWF storage engine.
All computers and browsers would still have to have Flash installed, but you wouldn't have to write your own Flash app. You would benefit from using the one maintained by the YUI team.
As others have said, this is not very portable, but in a controlled environment, it might work for you.
Cookies can be shared with other data storage, through browser extensions. Maybe in Flash or Google Gears you can maintain shared DB between browsers, but it needs to be installed on both of them, of course.
Edit:
In Google Gears you can't. Maybe you should write self-made extension... or some user-login system, where the data will sit on the server.

Suggestion for Approachs to Develop Multi tenant Django Proj on Google App Engine

I was hoping to get some suggestions on some best approaches to develop a multi tenant Django project on Google AppEngine.
Some Thoughts to Consider.
I would assume using djnago.contrib.sites is a must.
I would like to use existing applications such as django-profiles and django-registration, I know their models would need porting.
Can multiple domains be pointed to the GAE App and the site be automatically chosen from the request headers?
IF not multiple domains, is there a way to say take a request say to www.example.com/tenantA/login and www.example.com/tenantB/login and push them to one view but with knowledge tennant without changing all the views, maybe using custom managers to hide the complexity from the views.
Generally hoping this will be a discussion of any approaches you have taken in the past or plan to take.
Looking forward to any Comments/Answers.
Regards
Mark
I can answer the App Engine questions for you, though I don't know the Django ones:
Yes, anyone can point a domain to your app using Google Apps, with the 'add services' option, entering your App ID when prompted. You can then check the 'Host' header to determine what site you want to use.
You can hide information per-tenant by using hooks to automatically insert the host in entities and queries: http://code.google.com/appengine/articles/hooks.html
Today Google released SDK 1.3.6, which includes multi-tenancy baked right into the solution.
http://googleappengine.blogspot.com/2010/08/multi-tenancy-support-high-performance_17.html