Skip to content

Instantly share code, notes, and snippets.

@rahulaga
Created January 7, 2016 05:03
Show Gist options
  • Save rahulaga/5f72db364037ba4f01e1 to your computer and use it in GitHub Desktop.
Save rahulaga/5f72db364037ba4f01e1 to your computer and use it in GitHub Desktop.
//1. Auth API
//Controller
class AuthenticationResource {
//some implementation of interface is provided here
private AuthenticationService authService;
@Path("/authenticate")
public Response authenticate(String username, String password){
//call service and map exception
}
}
//Service interface
interface AuthenticationService{
String authenticate(String username, String password) throws AuthFailException;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment