|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.services.deployment.Environment
public class Environment
An encapsulation of runtime resources provided by the container.
For example, resources provided to J2EE connectors through
javax.resource.spi.BootstrapContext
might be
encapsulated here. Applications can also use objects of this
class to provide a simulated JAAS configuration to Foundation
Services so that Foundation Services can be deployed in an
environment without a "real" JAAS configuration.
Constructor Summary | |
---|---|
Environment()
Create an Environment object. |
Method Summary | |
---|---|
java.util.List |
getAppConfigurationEntry(java.lang.String appConfigurationEntryName)
Return the JAAS application configuration entry for Foundation Services. |
void |
setAppConfigurationEntry(javax.security.auth.login.AppConfigurationEntry[] appConfigurationEntry)
Set the simulated JAAS application configuration entry. |
Constructor Detail |
---|
public Environment()
Method Detail |
---|
public void setAppConfigurationEntry(javax.security.auth.login.AppConfigurationEntry[] appConfigurationEntry)
javax.security.auth.login.Configuration.setConfiguration()
.
That method sets the new JAAS configuration globally and may
affect the operation of other parts of the system that depend on
JAAS.
Applications may use this method to change the JAAS configuration
for a Foundation Services deployment that has already been deployed.
The new JAAS configuration will take effect immediately. However,
the behavior of any existing UserContext
objects at
the time this method is called is undefined. Therefore, it is a
best practice to call this method only before deploying Foundation
Services or after destroying all UserContext
objects.
The following code provides a sample that shows how one might define an AppConfigurationEntry for an OMILoginModule.
import java.util.HashMap; import java.util.Map; import javax.security.auth.login.AppConfigurationEntry; import javax.security.auth.login.AppConfigurationEntry.LoginModuleControlFlag; import com.sas.services.security.login.LoginPropertyConstants; import com.sas.services.security.login.OMILoginModule; Map optionsMap = new HashMap(5); optionsMap.put( LoginPropertyConstants.PROPERTYNAME_HOST, "xxx.yyy.com"); optionsMap.put( LoginPropertyConstants.PROPERTYNAME_PORT, "8561"); optionsMap.put( "repository", "Foundation"); optionsMap.put( LoginPropertyConstants.PROPERTYNAME_DOMAIN, "DefaultAuth"); optionsMap.put( LoginPropertyConstants.PROPERTYNAME_DEBUG, LoginPropertyConstants.PROPERTYVALUE_FALSE); AppConfigurationEntry[] appConfigurationEntries = new AppConfigurationEntry[] { new AppConfigurationEntry( OMILoginModule.class.getName(), LoginModuleControlFlag.OPTIONAL, optionsMap) };
appConfigurationEntry
- the simulated JAAS
application configuration entry or null
if there are no entries.public java.util.List getAppConfigurationEntry(java.lang.String appConfigurationEntryName)
setAppConfigurationEntry()
,
that entry will be returned. Otherwise, this method will
look up the entry in the JAAS configuration and return
it. If there is no entry with the given name, this method
will return null
.
The returned object is an unmodifiable list whose elements are
all instances of
javax.security.auth.login.AppConfigurationEntry
.
appConfigurationEntryName
- Name of the desired application configuration entry.
|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |