public class SecurityContextFactory extends Object
Constructor and Description |
---|
SecurityContextFactory() |
Modifier and Type | Method and Description |
---|---|
static SecurityContext |
createSecurityContext(Principal p,
Object cred,
Subject s,
String securityDomain)
Create a security context
|
static SecurityContext |
createSecurityContext(Principal p,
Object cred,
Subject s,
String securityDomain,
ClassLoader classLoader)
Create a security context
|
static SecurityContext |
createSecurityContext(Principal p,
Object cred,
Subject s,
String securityDomain,
String fqnClass,
ClassLoader classLoader)
Create a security context
|
static SecurityContext |
createSecurityContext(String securityDomain)
Create a security context
|
static SecurityContext |
createSecurityContext(String securityDomain,
Class<? extends SecurityContext> clazz)
Create a security context given the class
This method exists because classloader.loadClass is an expensive
operation due to synchronization
|
static SecurityContext |
createSecurityContext(String securityDomain,
ClassLoader classLoader)
Create a security context
|
static SecurityContext |
createSecurityContext(String securityDomain,
String fqnClass)
Construct a SecurityContext
|
static SecurityContext |
createSecurityContext(String securityDomain,
String fqnClass,
ClassLoader classLoader)
Construct a SecurityContext
|
static SecurityContextUtil |
createUtil(SecurityContext sc)
Return an instance of the SecurityContextUtil
|
static SecurityContextUtil |
createUtil(SecurityContext sc,
Class<? extends SecurityContextUtil> utilClazz)
Return an instance of the SecurityContextUtil given a Class instance of the util class
|
static SecurityContextUtil |
createUtil(SecurityContext sc,
ClassLoader classLoader)
Return an instance of the SecurityContextUtil
|
static SecurityContextUtil |
createUtil(SecurityContext sc,
String utilFQN)
Return an instance of the SecurityContextUtil given a FQN of the util class
|
static SecurityContextUtil |
createUtil(SecurityContext sc,
String utilFQN,
ClassLoader classLoader)
Return an instance of the SecurityContextUtil given a FQN of the util class
|
static void |
setDefaultSecurityContextFQN(String fqn)
Set the default security context fqn
|
static void |
setDefaultSecurityContextUtilFQN(String fqn)
Set the default util class fqn
|
public static SecurityContext createSecurityContext(String securityDomain) throws Exception
securityDomain
- Security Domain driving the contextException
public static SecurityContext createSecurityContext(String securityDomain, ClassLoader classLoader) throws Exception
securityDomain
- Security Domain driving the contextclassLoader
- ClassLoader to useException
public static SecurityContext createSecurityContext(String securityDomain, String fqnClass) throws Exception
securityDomain
- The Security DomainfqnClass
- Fully Qualified Name of the SecurityContext ClassException
public static SecurityContext createSecurityContext(String securityDomain, String fqnClass, ClassLoader classLoader) throws Exception
securityDomain
- The Security DomainfqnClass
- Fully Qualified Name of the SecurityContext ClassclassLoader
- ClassLoader to useException
public static SecurityContext createSecurityContext(String securityDomain, Class<? extends SecurityContext> clazz) throws Exception
securityDomain
- clazz
- Exception
public static SecurityContext createSecurityContext(Principal p, Object cred, Subject s, String securityDomain) throws Exception
p
- Principalcred
- Credentials
- SubjectsecurityDomain
- SecurityDomainException
createSecurityContext(String)
public static SecurityContext createSecurityContext(Principal p, Object cred, Subject s, String securityDomain, ClassLoader classLoader) throws Exception
p
- Principalcred
- Credentials
- SubjectsecurityDomain
- SecurityDomainclassLoader
- ClassLoader to useException
createSecurityContext(String)
public static SecurityContext createSecurityContext(Principal p, Object cred, Subject s, String securityDomain, String fqnClass, ClassLoader classLoader) throws Exception
p
- Principalcred
- Credentials
- SubjectsecurityDomain
- SecurityDomainfqnClass
- FQN of the SecurityContext class to be instantiatedclassLoader
- ClassLoader to useException
createSecurityContext(String)
public static SecurityContextUtil createUtil(SecurityContext sc) throws Exception
sc
- SecurityContextException
public static SecurityContextUtil createUtil(SecurityContext sc, ClassLoader classLoader) throws Exception
sc
- SecurityContextclassLoader
- ClassLoader to useException
public static SecurityContextUtil createUtil(SecurityContext sc, String utilFQN) throws Exception
sc
- SecurityContextutilFQN
- fqn of the util classException
public static SecurityContextUtil createUtil(SecurityContext sc, String utilFQN, ClassLoader classLoader) throws Exception
sc
- SecurityContextutilFQN
- fqn of the util classclassLoader
- ClassLoader to useException
public static SecurityContextUtil createUtil(SecurityContext sc, Class<? extends SecurityContextUtil> utilClazz) throws Exception
sc
- SecurityContextException
public static void setDefaultSecurityContextFQN(String fqn)
fqn
- public static void setDefaultSecurityContextUtilFQN(String fqn)
fqn
- Copyright © 2018 JBoss by Red Hat. All rights reserved.