-
Notifications
You must be signed in to change notification settings - Fork 12
User Login
Ta Van Dung edited this page Jul 12, 2016
·
3 revisions
import com.tvd12.ezyfox.core.annotation.RequestParam;
import com.tvd12.ezyfox.core.annotation.ResponseParam;
import com.tvd12.ezyfox.core.annotation.ServerEventHandler;
import com.tvd12.ezyfox.core.command.Log;
import com.tvd12.ezyfox.core.config.ServerEvent;
import com.tvd12.ezyfox.core.content.AppContext;
import com.tvd12.ezyfox.core.entities.ApiLogin;
import lombok.Data;
@Data
@ServerEventHandler(event = ServerEvent.USER_LOGIN)
public class UserLoginHandler {
@RequestParam("1")
private String version; // for example
public void handle(AppContext context, ApiLogin data) throws Exception {
// your business
// throw new com.tvd12.ezyfox.core.exception.BadRequestException.BadRequestException() to reject this login transaction
}
}Hello World