couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Weber <scotty2...@sbcglobal.net>
Subject Re: authentication_redirect is not working.
Date Mon, 14 Apr 2014 15:55:47 GMT
No, that doesn't work.  It actually is worse.

If I remap the vhosts to a DB/Document, it gives me the WHOLE DOCUMENT:
[vhosts]
www.mycompany.com = /login/source/

Results:
www.mycompany.com  -> maps to -> www.mycompany.com/login/source/
(where 'login' is the landing zone, and 'source' is the document that has the HTML attachment)


On the other hand, when I map it to the document like this:
[vhosts]
www.mycompany.com = /login/source/index.html

Results:
www.mycompany.com   -> maps to ->  www.mycompany.com/login/source/index.html
however, now it is trying to open style sheets and js files that have the name:

www.mycompany.com/login/source/index.html.mystyle.css
www.mycompany.com/login/source/index.html.mainpage.js

The obvious work around is to use the former option and mustspecify "www.mycompany.com/index.html"
as required on the address bar.

Which is not what is expected or were hoping for.  All other web servers allow a default
doc setting, typically index.html or index.htm.  Does CouchDB not have something equivalent?



-Scott




________________________________
 From: Benoit Chesneau <bchesneau@gmail.com>
To: "user@couchdb.apache.org" <user@couchdb.apache.org>; Scott Weber <scotty2541@sbcglobal.net>

Sent: Monday, April 14, 2014 9:22 AM
Subject: Re: authentication_redirect is not working.
 

On Mon, Apr 14, 2014 at 4:14 PM, Scott Weber <scotty2541@sbcglobal.net>wrote:

> Hmmmm.
> So your saying that 'www.mycompany.com/'
> would have to look like:
>
> {"couchdb":"Welcome","uuid":"5efb66f9db578b0fb0bffc3be5b56682","version":"1.5.0","vendor":{"version":"1.5.0","name":"SomeCompany"}}
> becauase CouchDB can't set up a page that looks like a standard default
> "index.html" ?
>
>
You can use the vhost feature + redirect to redirect / to a page in a doc
or a ddoc.

- benoit

>
>
>
>
>
> ________________________________
>  From: Johannes Jörg Schmidt <schmidt@netzmerk.com>
> To: user@couchdb.apache.org
> Sent: Monday, April 14, 2014 2:57 AM
> Subject: Re: authentication_redirect is not working.
>
>
> Basically its because CouchDB assumes browsers are requesting JSON.
>
> https://issues.apache.org/jira/browse/COUCHDB-1175 is not resolved,
> because
> the devs were not able to gain consense.
>
> Greetings
> Am 13.04.2014 23:29 schrieb "Scott Weber" <scotty2541@sbcglobal.net>:
>
> > Lets start with this, because it is almost exactly what I am fighting
> > with, but it doesn't work for me, like it did appear to work for the
> person
> > how posted this:
> >
> >
> >
> http://stackoverflow.com/questions/18966385/couchdb-access-denied-redirect
> >
> > The application I am building is open to the public, using CouchDB for
> > it's authentication, and 100% inside CouchDB with all JS, CSS, HTML as
> > attachments.
> >
> > Logically the uses starts at a login page which has no security, and
> after
> > success login, are redirected to other databases that service page
> requests
> > (which are based on their name, role, etc...)
> >
> > When I go directly to a database without logging in, I can't access it.
> > Which is fine, except I am getting that rather dry message:
> >
> >
> > {"error":"unauthorized","reason":"You are not authorized to access this
> > db."}
> > Which is really counter intuitive for an application.
> >
> > I have set the authentication redirect as describe in the link, to send
> > them to the login page, but nothing happens.  I still get the above dry
> > message.
> >
> > This is on both IE and FF.
> >
> > Any idea how to get an acceptable page?
> >
> >
> > -Scott
>
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message