All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.eshore.uas.fillter.WrapAction Maven / Gradle / Ivy

There is a newer version: 2.0.3
Show newest version
package com.eshore.uas.fillter;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.eshore.uas.extensions.Extend;
import com.eshore.uas.server.impl.BaseAuthManager;
import com.eshore.uas.system.ClientToken;

public class WrapAction{
	static DefaultAction [] ac=new DefaultAction[] {
			new LoginAction(),
			new TFAAction(),
			new ServiceTicketAction()
	};
	static {
		Extend.addExtension(new ClientToken());
	}
	
	public static boolean action(HttpServletRequest req,HttpServletResponse resp,BaseAuthManager bam) {
		for(DefaultAction a :ac) {
			if(a.accept(req)) {
				try {
					a.setBam(bam);
					a.action(req, resp);
				}catch(Exception e) {
					e.printStackTrace();
				}
				return true;
			}
		}
		return false;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy