@Test public void testGetPublicKey() throws Exception{ getPublicKey(this); }
@GET @Path("/key") @Produces(MediaType.APPLICATION_JSON) public Response getPublicKey() { try{ return Response .ok() .entity(authServerLogic.getPublicKey()) .build(); } catch (Exception e) { logger.severe(ExceptionUtils.getStackTrace(e)); return Response.serverError().build(); } }
AuthenticationEndpoint { @GET @Path("/key") @Produces(MediaType.APPLICATION_JSON) public Response getPublicKey() { try{ return Response .ok() .entity(authServerLogic.getPublicKey()) .build(); } catch (Exception e) { logger.severe(ExceptionUtils.getStackTrace(e)); return Response.serverError().build(); } } }
AuthenticationEndpoint { @GET @Path("/key") @Produces(MediaType.APPLICATION_JSON) public Response getPublicKey() { try{ return Response .ok() .entity(authServerLogic.getPublicKey()) .build(); } catch (Exception e) { logger.severe(ExceptionUtils.getStackTrace(e)); return Response.serverError().build(); } }  }
AuthenticationEndpoint { @GET @Path("/key") @Produces(MediaType.APPLICATION_JSON) public Response getPublicKey() { try{ return Response .ok() .entity(authServerLogic.getPublicKey()) .build(); } catch (Exception e) { logger.severe(ExceptionUtils.getStackTrace(e)); return Response.serverError().build(); } }  @PostConstruct void init(); @POST @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response userSignUp(@Context ContainerRequestContext context, Credentials credentials); @PUT @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response userSignIn(@Context ContainerRequestContext context, Credentials credentials); @GET @Path("/key") @Produces(MediaType.APPLICATION_JSON) Response getPublicKey(); @GET @Path("/validate/{token}") @Produces(MediaType.APPLICATION_JSON) Response validateAccount(@PathParam("token") String token); @GET @Path("/from/{token}") @Produces(MediaType.APPLICATION_JSON) Response getUserFromToken(@Context ContainerRequestContext context, @PathParam("token") String token); @GET @Path("/recover/{token}") @Produces(MediaType.APPLICATION_JSON) Response recoverFromOneTimeToken(@Context ContainerRequestContext context, @PathParam("token") String token); @POST @Path("/user/data/{userId}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response recieveUserData(@Context Session session, @PathParam("userId") String userId, Map<String,?> data); @PUT @Path("/user/data/{userId}") @Produces(MediaType.APPLICATION_JSON) Response sendUserData(@Context Session session, @PathParam("userId") String userId); }
AuthenticationEndpoint { @GET @Path("/key") @Produces(MediaType.APPLICATION_JSON) public Response getPublicKey() { try{ return Response .ok() .entity(authServerLogic.getPublicKey()) .build(); } catch (Exception e) { logger.severe(ExceptionUtils.getStackTrace(e)); return Response.serverError().build(); } }  @PostConstruct void init(); @POST @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response userSignUp(@Context ContainerRequestContext context, Credentials credentials); @PUT @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response userSignIn(@Context ContainerRequestContext context, Credentials credentials); @GET @Path("/key") @Produces(MediaType.APPLICATION_JSON) Response getPublicKey(); @GET @Path("/validate/{token}") @Produces(MediaType.APPLICATION_JSON) Response validateAccount(@PathParam("token") String token); @GET @Path("/from/{token}") @Produces(MediaType.APPLICATION_JSON) Response getUserFromToken(@Context ContainerRequestContext context, @PathParam("token") String token); @GET @Path("/recover/{token}") @Produces(MediaType.APPLICATION_JSON) Response recoverFromOneTimeToken(@Context ContainerRequestContext context, @PathParam("token") String token); @POST @Path("/user/data/{userId}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response recieveUserData(@Context Session session, @PathParam("userId") String userId, Map<String,?> data); @PUT @Path("/user/data/{userId}") @Produces(MediaType.APPLICATION_JSON) Response sendUserData(@Context Session session, @PathParam("userId") String userId);  }