Examples of SecurityDomain


Examples of org.jboss.ejb3.annotation.SecurityDomain

    * @see EJBContext#getCallerPrincipal()
    */
   public Principal getCallerPrincipal()
   {
      EJBContainer ec = (EJBContainer) container;
      SecurityDomain domain = ec.getAnnotation(SecurityDomain.class);
      Principal callerPrincipal = ejbContextHelper.getCallerPrincipal(SecurityActions.getSecurityContext(),
            rm, domain);
             
      // This method never returns null.
      if (callerPrincipal == null)
View Full Code Here

Examples of org.jboss.ejb3.annotation.SecurityDomain

         WebServiceDeployment apiAdapter = WebServiceDeploymentApiAdapter.createInstance(ejb3Deployment);
         Iterator<WebServiceDeclaration> it = apiAdapter.getServiceEndpoints().iterator();
         while (it.hasNext())
         {
            WebServiceDeclaration container = it.next();
            SecurityDomain anSecurityDomain = container.getAnnotation(SecurityDomain.class);
            if (anSecurityDomain != null)
            {
               if (securityDomain != null && !securityDomain.equals(anSecurityDomain.value()))
                  throw new IllegalStateException("Multiple security domains not supported");

               securityDomain = anSecurityDomain.value();
            }
         }
      }

      if (securityDomain != null)
View Full Code Here

Examples of org.jboss.ejb3.annotation.SecurityDomain

   public <T> T getSecurityManager(Class<T> type)
   {
      try
      {
         InitialContext ctx = getInitialContext();
         SecurityDomain securityAnnotation = (SecurityDomain) resolveAnnotation(SecurityDomain.class);
         if (securityAnnotation != null && securityAnnotation.value().length() > 0)
         {
            return (T) SecurityDomainManager.getSecurityManager(securityAnnotation.value(),ctx);
         }
         return null;
      }
      catch (NamingException e)
      {
View Full Code Here

Examples of org.jboss.ejb3.annotation.SecurityDomain

      {
         Iterator<WebServiceDeclaration> it = webServiceDeployment.getServiceEndpoints().iterator();
         while (it.hasNext())
         {
            WebServiceDeclaration container = it.next();
            SecurityDomain anSecurityDomain = container.getAnnotation(SecurityDomain.class);
            if (anSecurityDomain != null)
            {
               if (securityDomain != null && !securityDomain.equals(anSecurityDomain.value()))
                  throw new IllegalStateException("Multiple security domains not supported");

               securityDomain = anSecurityDomain.value();
            }
         }
      }

      if (securityDomain != null)
View Full Code Here

Examples of org.jboss.resteasy.plugins.server.embedded.SecurityDomain

  private static Dispatcher dispatcher;

  @BeforeClass
  public static void beforeClass() throws Exception
  {
    dispatcher = EmbeddedContainer.start("/", new SecurityDomain(){

      public Principal authenticate(String username, String password)
          throws SecurityException {
        return new SimplePrincipal(username);
      }
View Full Code Here

Examples of org.jboss.security.SecurityDomain

   public void start() throws Exception
   {
      if(securityDomain != null)
      {
         InitialContext ctx = new InitialContext();
         SecurityDomain domain = (SecurityDomain) ctx.lookup(securityDomain);
         serverSocketFactory = new DomainServerSocketFactory();
         serverSocketFactory.setSecurityDomain(domain);
      }
      else
      {
View Full Code Here

Examples of org.jboss.security.SecurityDomain

   public JaasSecurityDomainSocketFactory()
   {
      super();
      if (log.isTraceEnabled())
         log.trace("Creating socket factory: " + this.getClass().getName());
      SecurityDomain sd = getJaasSecurityDomain();
      setSecurityDomain(sd);
   }
View Full Code Here

Examples of org.jboss.security.SecurityDomain

         if (!secDomain.startsWith("java:/jaas/") || !secDomain.startsWith("java:jaas/"))
            secDomain = "java:/jaas/" + secDomain;
         try
         {
            InitialContext iniCtx = new InitialContext();
            SecurityDomain sd = (SecurityDomain) iniCtx.lookup(secDomain);
            if (log.isDebugEnabled())
               log.debug("Created Security Domain object from " + secDomain + ":" + sd.toString());
            return sd;
         }
         catch (Exception e)
         {
            log.error("Failed to create Security Domain '" + secDomain + "'", e);
View Full Code Here

Examples of org.jboss.security.SecurityDomain

   {
      DomainSocketFactory ssf = null;
      try
      {
         InitialContext iniCtx = new InitialContext();
         SecurityDomain sd = (SecurityDomain)iniCtx.lookup("java:/jaas/other");
         ssf = new DomainSocketFactory(sd);
      }
      catch(Exception e)
      {
         log.error("Failed to create default SocketFactory", e);
View Full Code Here

Examples of org.jboss.security.SecurityDomain

   public JaasSecurityDomainServerSocketFactory()
   {
      super();
      if (log.isTraceEnabled())
         log.trace("Creating socket factory: " + this.getClass().getName());
      SecurityDomain sd = getJaasSecurityDomain();
      setSecurityDomain(sd);
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.