> On Apr 20, 2015, at 6:51 PM, atom992 <[email protected]> wrote:
> 
> I want to auth user by 4984 with custom auth, not Facebook or persona auth. 
> and I want to set expires time to 3 month, because I want user needn't 
> relogin in 3 month.

You can’t do that on port 4984, as we already said.

> btw, I wann't to add extra auth server, because If so, I need to sync account 
> info between auth server with sync Gateway.


No, you don’t need to sync account info. You just need to implement an HTTP 
handler that takes username/password from the request, then uses them with HTTP 
Basic auth to make some sort of test request on port 4984 (like GET /dbname). 
If the test request succeeds, it can create a session using /dbname/_session on 
port 4985 (with your own custom expiration time), and pass the cookie back to 
the client in a Set-Cookie header.

Alternatively you could build your own copy of Sync Gateway after modifying the 
value of kDefaultSessionTTL in session_api.go. Or you could file an issue on 
Github and request that the session TTL be made configurable.

—Jens

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/10FF978A-AC36-4653-84FA-46E7D7260422%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to