authorizationcheck.java

来自「该HttpProxy用于从Applet或Swing界面中访问Ejb和服务端的Ja」· Java 代码 · 共 31 行

JAVA
31
字号
/*
 * Created on 2005-6-28
 *
 * To change the template for this generated file go to
 * Window - Preferences - Java - Code Generation - Code and Comments
 */
package com.nari.pmos.proxy.common;

import java.security.Principal;

/**
 * @author hujun
 * 
 * To change the template for this generated type comment go to Window -
 * Preferences - Java - Code Generation - Code and Comments
 */
public class AuthorizationCheck {
	static boolean Check(javax.ejb.EJBContext ctx, String beanName,
			String methodName) {
		try {
			Principal principal = ctx.getCallerPrincipal();
			String user = principal.getName();
			// 通过本地接口验证方法

		} catch (Exception ex) {
			return false;
		}
		return true;
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?