Example #1
0
 @With({UserCredentialWrapFilter.class, ConnectToDBFilter.class})
 public static Result logoutWithDevice(String deviceId) throws SqlInjectionException {
   String token = (String) Http.Context.current().args.get("token");
   UserService.logout(deviceId);
   SessionTokenProvider.getSessionTokenProvider().removeSession(token);
   return noContent();
 }
Example #2
0
 @With({UserCredentialWrapFilter.class, ConnectToDBFilter.class})
 public static Result logoutWithDevice(String pushToken) throws SqlInjectionException {
   String token = (String) Http.Context.current().args.get("token");
   if (!StringUtils.isEmpty(token)) {
     UserService.logout(pushToken);
     SessionTokenProvider.getSessionTokenProvider().removeSession(token);
   }
   return ok("pushToken: " + pushToken + " logged out");
 }