package com.inepex.ineFrame.shared.auth;

import java.util.Set;

import com.inepex.ineom.shared.dispatch.GenericActionResult;

public class AuthStatusResultBase extends GenericActionResult {

	//if login was unsuccessful
	protected boolean needCaptcha;
	
	//if login is succesful
	protected String displayName;
	protected Long userId = null;
	protected Set<String> roles = null;
	// these two variables are for the stay signed in functionality
	protected String userEmail = null;
	protected String userUUID = null;

	public AuthStatusResultBase() {
	}
	
	public AuthStatusResultBase(boolean needCaptcha) {
		setSuccess(false);
		this.needCaptcha=needCaptcha;
	}

	public AuthStatusResultBase(String displayName, Long userId, Set<String> roles) {
		setSuccess(true);
		this.displayName = displayName;
		this.userId = userId;
		this.roles = roles;
	}

	public AuthStatusResultBase(String displayName, Long userId, Set<String> roles, String userEmail, String userUUID) {
		setSuccess(true);
		this.displayName = displayName;
		this.userId = userId;
		this.roles = roles;
		this.userEmail=userEmail;
		this.userId=userId;
		this.userUUID=userUUID;
	}
	
	public String getDisplayName() {
		return displayName;
	}
	
	public void setDisplayName(String displayName) {
		this.displayName = displayName;
	}

	public Long getUserId() {
		return userId;
	}

	public Set<String> getRoles() {
		return roles;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public void setRoles(Set<String> roles) {
		this.roles = roles;
	}
	
	public boolean isNeedCaptcha() {
		return needCaptcha;
	}
	
	public void setNeedCaptcha(boolean needCaptcha) {
		this.needCaptcha = needCaptcha;
	}

	public String getUserEmail() {
		return userEmail;
	}

	public void setUserEmail(String userEmail) {
		this.userEmail = userEmail;
	}

	public String getUserUUID() {
		return userUUID;
	}

	public void setUserUUID(String userUUID) {
		this.userUUID = userUUID;
	}

	@Override
	public String toString() {
		return "AuthStatusResultBase [displayName=" + displayName + ", userId="
				+ userId + ", userEmail=" + userEmail + ", userUUID="
				+ userUUID + "]";
	}
}

@@ -35,16 +35,38 @@
 .auth;%0A%0A
+import java.util.Map;%0A
 import j
@@ -529,16 +529,64 @@
  = null;
+%0A%09%0A%09protected Map%3CString, String%3E userPropJsons;
 %0A%0A%09publi
@@ -2014,16 +2014,202 @@
 ID;%0A%09%7D%0A%0A
+%09public Map%3CString, String%3E getUserPropJsons() %7B%0A%09%09return userPropJsons;%0A%09%7D%0A%0A%09public void setUserPropJsons(Map%3CString, String%3E userPropJsons) %7B%0A%09%09this.userPropJsons = userPropJsons;%0A%09%7D%0A%0A
 %09@Overri

Insert custom properties when user logging in