Class LDAPConfigurationUtil
- java.lang.Object
-
- org.oa4mp.delegation.server.server.claims.ClaimSourceConfigurationUtil
-
- org.oa4mp.delegation.server.server.config.LDAPConfigurationUtil
-
public class LDAPConfigurationUtil extends ClaimSourceConfigurationUtil
A utility that loads the configuration from a node and has the tags, etc. for it.Created by Jeff Gaynor
on 5/4/16 at 8:50 AM
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLDAPConfigurationUtil.AttributeEntry
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_PORTstatic StringIS_GROUPstatic StringLDAP_ADDRESS_TAGstatic StringLDAP_AUTH_NONEstatic intLDAP_AUTH_NONE_KEYstatic StringLDAP_AUTH_SIMPLEstatic intLDAP_AUTH_SIMPLE_KEYstatic StringLDAP_AUTH_STRONGstatic intLDAP_AUTH_STRONG_KEYstatic StringLDAP_AUTH_TYPEstatic intLDAP_AUTH_UNSPECIFIED_KEYstatic StringLDAP_CONTEXT_NAME_TAGstatic StringLDAP_PASSWORD_TAGstatic StringLDAP_PORT_TAGstatic StringLDAP_SEARCH_ATTRIBUTE_TAGstatic StringLDAP_SEARCH_ATTRIBUTES_TAGstatic StringLDAP_SEARCH_BASE_TAGstatic StringLDAP_SECURITY_PRINCIPAL_TAGstatic StringLDAP_TAGstatic StringRETURN_AS_LISTstatic StringRETURN_NAMEstatic StringSEARCH_FILTER_ATTRIBUTE_DEFAULTstatic StringSEARCH_FILTER_ATTRIBUTE_KEYstatic StringSEARCH_NAME_KEYstatic StringSEARCH_NAME_USERNAMEstatic StringSEARCH_SCOPEstatic StringSEARCH_SCOPE_OBJECTstatic StringSEARCH_SCOPE_ONE_LEVELstatic StringSEARCH_SCOPE_SUBTREE-
Fields inherited from class org.oa4mp.delegation.server.server.claims.ClaimSourceConfigurationUtil
ENABLED_TAG, FAIL_ON_ERROR_TAG, ID_TAG, NAME_TAG, NOTIFY_ON_FAIL_TAG, OMIT_CLAIMS_LIST_TAG
-
-
Constructor Summary
Constructors Constructor Description LDAPConfigurationUtil()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClaimSourceConfigurationcreateConfiguration()Override as needed to create a new configuration of the right type.Collection<LDAPConfiguration>fromJSON(net.sf.json.JSON json)Takes a genericJSONobject and disambiguates it, returning a collection of LDAP configurations.Collection<LDAPConfiguration>fromJSON(net.sf.json.JSONArray json)LDAPConfigurationfromJSON(net.sf.json.JSONObject json)LDAPConfigurationfromJSON(ClaimSourceConfiguration claimSourceConfiguration, net.sf.json.JSONObject json)Populate an existing LDAPConfiguration from the JSON.StringgetAuthName(int authType)intgetAuthType(String x)StringgetComponentName()LDAPConfigurationgetLdapConfiguration(edu.uiuc.ncsa.security.core.util.MyLoggingFacade logger, org.apache.commons.configuration.tree.ConfigurationNode node)Converts an XML configuration into an configuration.booleanisLDAPCOnfig(net.sf.json.JSONObject json)Check if a configuration is for ldap.net.sf.json.JSONArraytoJSON(Collection<LDAPConfiguration> configurations)Converts a collection of configuration to aJSONArrayof objects.net.sf.json.JSONObjecttoJSON(LDAPConfiguration configuration)Convert a single configuration to aJSONObject.-
Methods inherited from class org.oa4mp.delegation.server.server.claims.ClaimSourceConfigurationUtil
getConfiguration, getJSONUtil, isInstanceOf, toJSON
-
-
-
-
Field Detail
-
LDAP_TAG
public static final String LDAP_TAG
- See Also:
- Constant Field Values
-
LDAP_PASSWORD_TAG
public static final String LDAP_PASSWORD_TAG
- See Also:
- Constant Field Values
-
LDAP_ADDRESS_TAG
public static final String LDAP_ADDRESS_TAG
- See Also:
- Constant Field Values
-
LDAP_SEARCH_BASE_TAG
public static final String LDAP_SEARCH_BASE_TAG
- See Also:
- Constant Field Values
-
SEARCH_NAME_USERNAME
public static final String SEARCH_NAME_USERNAME
- See Also:
- Constant Field Values
-
SEARCH_NAME_KEY
public static final String SEARCH_NAME_KEY
- See Also:
- Constant Field Values
-
SEARCH_FILTER_ATTRIBUTE_KEY
public static final String SEARCH_FILTER_ATTRIBUTE_KEY
- See Also:
- Constant Field Values
-
SEARCH_FILTER_ATTRIBUTE_DEFAULT
public static final String SEARCH_FILTER_ATTRIBUTE_DEFAULT
- See Also:
- Constant Field Values
-
SEARCH_SCOPE
public static final String SEARCH_SCOPE
- See Also:
- Constant Field Values
-
SEARCH_SCOPE_SUBTREE
public static final String SEARCH_SCOPE_SUBTREE
- See Also:
- Constant Field Values
-
SEARCH_SCOPE_OBJECT
public static final String SEARCH_SCOPE_OBJECT
- See Also:
- Constant Field Values
-
SEARCH_SCOPE_ONE_LEVEL
public static final String SEARCH_SCOPE_ONE_LEVEL
- See Also:
- Constant Field Values
-
LDAP_SEARCH_ATTRIBUTES_TAG
public static final String LDAP_SEARCH_ATTRIBUTES_TAG
- See Also:
- Constant Field Values
-
LDAP_SEARCH_ATTRIBUTE_TAG
public static final String LDAP_SEARCH_ATTRIBUTE_TAG
- See Also:
- Constant Field Values
-
LDAP_SECURITY_PRINCIPAL_TAG
public static final String LDAP_SECURITY_PRINCIPAL_TAG
- See Also:
- Constant Field Values
-
LDAP_PORT_TAG
public static final String LDAP_PORT_TAG
- See Also:
- Constant Field Values
-
LDAP_CONTEXT_NAME_TAG
public static final String LDAP_CONTEXT_NAME_TAG
- See Also:
- Constant Field Values
-
DEFAULT_PORT
public static final int DEFAULT_PORT
- See Also:
- Constant Field Values
-
LDAP_AUTH_TYPE
public static final String LDAP_AUTH_TYPE
- See Also:
- Constant Field Values
-
LDAP_AUTH_NONE
public static final String LDAP_AUTH_NONE
- See Also:
- Constant Field Values
-
LDAP_AUTH_UNSPECIFIED_KEY
public static final int LDAP_AUTH_UNSPECIFIED_KEY
- See Also:
- Constant Field Values
-
LDAP_AUTH_NONE_KEY
public static final int LDAP_AUTH_NONE_KEY
- See Also:
- Constant Field Values
-
LDAP_AUTH_SIMPLE
public static final String LDAP_AUTH_SIMPLE
- See Also:
- Constant Field Values
-
LDAP_AUTH_SIMPLE_KEY
public static final int LDAP_AUTH_SIMPLE_KEY
- See Also:
- Constant Field Values
-
LDAP_AUTH_STRONG
public static final String LDAP_AUTH_STRONG
- See Also:
- Constant Field Values
-
LDAP_AUTH_STRONG_KEY
public static final int LDAP_AUTH_STRONG_KEY
- See Also:
- Constant Field Values
-
RETURN_NAME
public static final String RETURN_NAME
- See Also:
- Constant Field Values
-
RETURN_AS_LIST
public static final String RETURN_AS_LIST
- See Also:
- Constant Field Values
-
IS_GROUP
public static final String IS_GROUP
- See Also:
- Constant Field Values
-
-
Method Detail
-
createConfiguration
public ClaimSourceConfiguration createConfiguration()
Description copied from class:ClaimSourceConfigurationUtilOverride as needed to create a new configuration of the right type.- Overrides:
createConfigurationin classClaimSourceConfigurationUtil- Returns:
-
getComponentName
public String getComponentName()
- Overrides:
getComponentNamein classClaimSourceConfigurationUtil
-
getLdapConfiguration
public LDAPConfiguration getLdapConfiguration(edu.uiuc.ncsa.security.core.util.MyLoggingFacade logger, org.apache.commons.configuration.tree.ConfigurationNode node)
Converts an XML configuration into an configuration. This is used at bootstrap time if there is a default configuration for the server.- Parameters:
logger-node-- Returns:
-
getAuthName
public String getAuthName(int authType)
-
getAuthType
public int getAuthType(String x)
-
toJSON
public net.sf.json.JSONArray toJSON(Collection<LDAPConfiguration> configurations)
Converts a collection of configuration to aJSONArrayof objects.- Parameters:
configurations-- Returns:
-
toJSON
public net.sf.json.JSONObject toJSON(LDAPConfiguration configuration)
Convert a single configuration to aJSONObject.- Parameters:
configuration-- Returns:
-
fromJSON
public Collection<LDAPConfiguration> fromJSON(net.sf.json.JSON json)
Takes a genericJSONobject and disambiguates it, returning a collection of LDAP configurations.- Parameters:
json-- Returns:
-
fromJSON
public Collection<LDAPConfiguration> fromJSON(net.sf.json.JSONArray json)
-
isLDAPCOnfig
public boolean isLDAPCOnfig(net.sf.json.JSONObject json)
Check if a configuration is for ldap.- Parameters:
json-- Returns:
-
fromJSON
public LDAPConfiguration fromJSON(ClaimSourceConfiguration claimSourceConfiguration, net.sf.json.JSONObject json)
Populate an existing LDAPConfiguration from the JSON.- Overrides:
fromJSONin classClaimSourceConfigurationUtil- Parameters:
claimSourceConfiguration-json-- Returns:
-
fromJSON
public LDAPConfiguration fromJSON(net.sf.json.JSONObject json)
-
-