Hi there,
Does this helps you ?
http://ti.eng.br/couchbase-mobile-with-jwt-tokens/
BR, Thiago Alencar