1 /*2 * JBoss, the OpenSource J2EE webOS3 *4 * Distributable under LGPL license.5 * See terms of license at gnu.org.6 */7 8 package org.jboss.test.jbossnet.security.server;9 10 import org.jboss.test.util.ejb.SessionSupport;11 12 /**13 * Secured session bean to test web service authentication. Please ensure that14 * you have copied user.properties and role.properties from the 15 * security testsuite to your server configuration directory.16 * @author jung17 * @version $Revision: 1.1.1.1.6.1 $18 * @ejb.bean name="Authentication"19 * display-name="Authentication Bean"20 * type="Stateless"21 * view-type="remote"22 * jndi-name="security/Authentication"23 * @ejb.interface remote-class="org.jboss.test.jbossnet.security.Authentication" extends="javax.ejb.EJBObject"24 * @ejb.home remote-class="org.jboss.test.jbossnet.security.AuthenticationHome" extends="javax.ejb.EJBHome"25 * @ejb.permission role-name="Role2"26 * @ejb.transaction type="Required"27 * @jboss-net.web-service urn="Authentication"28 * @jboss-net.authentication domain="jbossnet-tests"29 */30 31 public class AuthenticationBean32 extends SessionSupport implements javax.ejb.SessionBean 33 {34 /**35 * @jboss-net.web-method36 * @ejb.interface-method view-type="remote"37 */38 39 public boolean workedOut()40 {41 // return true if role1 is logged in42 return sessionCtx.isCallerInRole("Role1");43 }44 45 }46