Skip to content

Instantly share code, notes, and snippets.

@alin-turcu
Last active May 16, 2018 18:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alin-turcu/3c49b996f13636670cf97b82759feea2 to your computer and use it in GitHub Desktop.
Save alin-turcu/3c49b996f13636670cf97b82759feea2 to your computer and use it in GitHub Desktop.
import com.groupon.grox.Action;
public class LoginSuccessfulAction implements Action<LoginStateModel> {
private User user
public LoginSuccessfulAction(User user){
this.user = user;
}
@Override
public State newState(LoginStateModel oldState) {
return oldState.toBuilder()
.setLoginState(LOGIN_SUCCESS)
.setLoggedInUser(user)
.build());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment