Este contenido no está disponible en el idioma seleccionado.
Chapter 7. Identity Trust Context
The
IdentityTrust Context contains the IdentityTrustModules.
package org.jboss.security.identitytrust;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.security.auth.callback.CallbackHandler;
import org.jboss.security.SecurityContext;
import org.jboss.security.identitytrust.IdentityTrustManager.TrustDecision;
//$Id$
/**
* Identity Trust Context that encloses multiple
* IdentityTrustModules, which make trust decisions
* @author Anil.Saldhana@redhat.com
* @since Aug 2, 2007
* @version $Revision$
*/
public abstract class IdentityTrustContext
{
protected TrustDecision DENY = TrustDecision.Deny;
protected TrustDecision PERMIT = TrustDecision.Permit;
protected TrustDecision NOTAPPLICABLE = TrustDecision.NotApplicable;
/**
* Provide a Security Context that the Trust Context
* should come to a decision about. The security domain
* driving the Security Context need not match the security
* domain of the Trust Context.
*/
protected SecurityContext securityContext;
/**
* Any Callback Handler
*/
protected CallbackHandler callbackHandler;
/**
* Shared State between trust modules
*/
protected Map sharedState = new HashMap();
/**
* Security Domain of the Identity Trust Context
*/
protected String securityDomain;
/**
* List of Identity Trust Modules
*/
protected List<IdentityTrustModule> modules = new ArrayList<IdentityTrustModule>();
/**
* Control Flags for the individual modules
*/
protected ArrayList controlFlags = new ArrayList();
/**
* Make a trust decision
* @return {@link TrustDecision#Deny},{@link TrustDecision#NotApplicable},
* {@link TrustDecision#Permit}
* @throws IdentityTrustException
*/
public abstract TrustDecision isTrusted() throws IdentityTrustException;
}
package org.jboss.security.identitytrust;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.security.auth.callback.CallbackHandler;
import org.jboss.security.SecurityContext;
import org.jboss.security.identitytrust.IdentityTrustManager.TrustDecision;
//$Id$
/**
* Identity Trust Context that encloses multiple
* IdentityTrustModules, which make trust decisions
* @author Anil.Saldhana@redhat.com
* @since Aug 2, 2007
* @version $Revision$
*/
public abstract class IdentityTrustContext
{
protected TrustDecision DENY = TrustDecision.Deny;
protected TrustDecision PERMIT = TrustDecision.Permit;
protected TrustDecision NOTAPPLICABLE = TrustDecision.NotApplicable;
/**
* Provide a Security Context that the Trust Context
* should come to a decision about. The security domain
* driving the Security Context need not match the security
* domain of the Trust Context.
*/
protected SecurityContext securityContext;
/**
* Any Callback Handler
*/
protected CallbackHandler callbackHandler;
/**
* Shared State between trust modules
*/
protected Map sharedState = new HashMap();
/**
* Security Domain of the Identity Trust Context
*/
protected String securityDomain;
/**
* List of Identity Trust Modules
*/
protected List<IdentityTrustModule> modules = new ArrayList<IdentityTrustModule>();
/**
* Control Flags for the individual modules
*/
protected ArrayList controlFlags = new ArrayList();
/**
* Make a trust decision
* @return {@link TrustDecision#Deny},{@link TrustDecision#NotApplicable},
* {@link TrustDecision#Permit}
* @throws IdentityTrustException
*/
public abstract TrustDecision isTrusted() throws IdentityTrustException;
}
The context contains a list of modules that handle trust-based decisions.