/* ************************************************************************
#
#  DivConq
#
#  http://divconq.com/
#
#  Copyright:
#    Copyright 2012 eTimeline, LLC. All rights reserved.
#
#  License:
#    See the license.txt file in the project's top-level directory for details.
#
#  Authors:
#    * Andy White
#
************************************************************************ */
package divconq.db.common;

import divconq.db.IDatabaseManager;
import divconq.db.UpdateRequest;
import divconq.struct.FieldStruct;
import divconq.struct.RecordStruct;

/**
 * Clear a user session token.  
 * 
 * @author Andy
 *
 */
public class SignOffRequest extends UpdateRequest {
	protected String token = null;
	
	/**
	 * @param v user authentication token
	 */
	public void setToken(String v) {
		this.token = v;
	}
	
	/**
	 * @param token user authentication token
	 */
	public SignOffRequest(String token) {
		super("dcSignOff");
		this.token = token;
	}
	
	/* (non-Javadoc)
	 * @see divconq.db.IDatabaseRequest#getDatabaseParams()
	 */
	@Override
	public RecordStruct getDatabaseParams(IDatabaseManager dbm) {
		return new RecordStruct(
				new FieldStruct("AuthToken", this.token)
		);
	}
}
