Created
January 7, 2016 05:03
-
-
Save rahulaga/5f72db364037ba4f01e1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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