package kcg.faics.sec;

import java.util.Collection;

import org.springframework.security.core.GrantedAuthority;

import egovframework.rte.fdl.security.userdetails.EgovUserDetails;

/**
 * 사용자 인증 객체 (Egov Security의 사용자 인증 객체 상속).
 * 
 * @author kimnomin
 *
 */
public class FaicsUserDetails extends EgovUserDetails {

	/**
	 * 사용자 구분. (f:외사경찰, <else>:일반경찰)
	 */
	private String userType;

	/**
	 * 로그인 실패횟수.
	 */
	private int chkcnt;

	/**
	 * @return the userType
	 */
	public final String getUserType() {
		return userType;
	}

	/**
	 * @param userType
	 *            the userType to set
	 */
	public final void setUserType(final String userType) {
		this.userType = userType;
	}

	/**
	 * @return the chkcnt
	 */
	public final int getChkcnt() {
		return chkcnt;
	}

	/**
	 * @param chkcnt
	 *            the chkcnt to set
	 */
	public final void setChkcnt(final int chkcnt) {
		this.chkcnt = chkcnt;
	}

	public FaicsUserDetails(final String username, final String password, final String userType, final int chkcnt, final boolean enabled, final boolean accountNonExpired,
			final boolean credentialsNonExpired, final boolean accountNonLocked, final Collection<? extends GrantedAuthority> authorities, final Object egovVO) throws IllegalArgumentException {
		super(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, authorities, egovVO);
		this.userType = userType;
		this.chkcnt = chkcnt;
	}

	public FaicsUserDetails(final String username, final String password, final String userType, final int chkcnt, final boolean enabled, final Object egovVO) throws IllegalArgumentException {
		super(username, password, enabled, egovVO);
		this.userType = userType;
		this.chkcnt = chkcnt;
	}

}
