Search

Chapter 13. JBoss Authentication Manager

download PDF
The default implementation includes an authentication manager interface, JBossAuthenticationManager, which is driven by the Java Authentication and Authorization Service (JAAS). The interface is as follows:
package org.jboss.security.plugins;

import java.security.Principal;
import java.util.HashMap;
import java.util.Map;

import javax.security.auth.Subject;
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.login.LoginContext;
import javax.security.auth.login.LoginException; 

import org.jboss.logging.Logger;
import org.jboss.security.AuthenticationManager;
import org.jboss.security.SecurityConstants;
import org.jboss.security.cache.JBossAuthenticationCache;
import org.jboss.security.cache.SecurityCache;
import org.jboss.security.cache.SecurityCacheException;
 

/**
 *  Default Implementation of the AuthenticationManager Interface 
 */
public class JBossAuthenticationManager implements AuthenticationManager
{
   private static Logger log = Logger.getLogger(JBossAuthenticationManager.class);
   
   protected String securityDomain = SecurityConstants.DEFAULT_APPLICATION_POLICY;
   
   protected CallbackHandler callbackHandler = null;
    
   private ThreadLocal<Subject> subjectLocal = new ThreadLocal<Subject>();
   
   private SecurityCache<Principal> sCache = null;

   private boolean cacheValidation = false; 
    
   public JBossAuthenticationManager(String sdomain, CallbackHandler cbh)
   { 
   }
   
   /**
    * Create JBossAuthenticationManager
    * @param sdomain SecurityDomain
    * @param cbh CallbackHandler
    * @param initCapacity Initial Capacity for the internal Security Cache
    * @param loadFactor Load Factor for the internal Security Cache
    * @param level Concurrency Level for the internal Security Cach
    */
   public JBossAuthenticationManager(String sdomain, CallbackHandler cbh, 
         int initCapacity, float loadFactor, int level)
   { 
   }
   
   public void setSecurityCache(String className)
   { 
   }

   /**
    * @see AuthenticationManager#getActiveSubject()
    */
   public Subject getActiveSubject()
   {  
   }

   /**
    * @see AuthenticationManager#getSecurityDomain()
    */
   public String getSecurityDomain()
   { 
   }

   /**
    * @see AuthenticationManager#getTargetPrincipal(Principal, Map)
    */
   public Principal getTargetPrincipal(Principal principal, Map<String,Object> map)
   { 
   }

   /**
    * @see AuthenticationManager#isValid(Principal, Object)
    */
   public boolean isValid(Principal principal, Object credential)
   { 
   } 

   /**
    * @see AuthenticationManager#isValid(Principal, Object, Subject)
    */
   public boolean isValid(Principal principal, Object credential, Subject subject)
   { 
   }  
}
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.