Great tip - Sebastian - I'm 100% sure I can do the Angular side of it now.

Related problem. I'm struggling to make the smallest amount of CURL
statements to close-down admin-party, and have the 'seats' repo:

1) anon is approved for *read* operations
2) must authenticate for *write* operations

Of course - I'd be happy to do the same with Perl one-liners on
default.ini, but users (etc) are not held in there.

- Paul


On Sun, Feb 21, 2016 at 9:39 AM, Sebastian Rothbucher <
[email protected]> wrote:

> Hi Paul,
>
> this looks great! Basically, you can submit credentials with the HTTP
> request and even keep cookies between requests from another server. So yes,
> logging in via POST and keeping the cookie could work when turning on this
> behavior in angular (which passes down to XHR):
> mymodule.config(function ($httpProvider)
> {$httpProvider.defaults.withCredentials=true;});
>
> I did try this against Tomcat on another occasion (so Tomcat port 1,
> http-server with angular port 2) and it did work - there, it was a POST to
> login (like in Couch: there it's a POST to _session) and with above
> setting, the login gets submitted with each further request
>
> Hope this works / helps - let us know!
>
> Best
>     Sebastian
>
>
> On Sat, Feb 20, 2016 at 6:06 PM, Paul Hammant <[email protected]> wrote:
>
> > I think it qualifies as "serverless", but not as a CouchApp (if it does I
> > will head off to that mail list instead of this one)
> >
> > A HTML+SVG app speaks to Couch via CORS, and is otherwise hosted on
> > GithubPages. Someone might be interested:
> >
> >     http://paulhammant.com/2015/12/21/angular-and-svg-and-couchdb/
> >
> > Next up, allow the seat information without authentication, but log in to
> > Couch, if a change is wanted.  I think that's possible with Couch, but I
> > have a grand total of six hours experience with it.  Thoughts?
> >
> > - Paul
> >
>

Reply via email to