Added Java API and wrapper to AuthService.