Added authenticate methods
Added example for publisher