Class AuthUtils
java.lang.Object
org.dlese.dpc.schemedit.security.auth.AuthUtils
- Author:
- Jonathan Ostwald
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AppConfigurationEntrygetConfiguredLoginModule(String loginModuleClass) Gets the the specified AppConfigurationEntry from the login configurationstatic ListGets the configuredLoginModules as list of loginModule class namesstatic ListgetConfiguredLoginModules(boolean verbose) Gets the configuredLoginModules as list of loginModule class names, optionally printing if "verbose" is true.static org.dom4j.DocumentgetLdapUserInfo(String searchString, String ldapField) Searches an LDAP directory and returns results in the form of a dom4j.Document.static StringGets the passwordFile attribute of the AuthUtils classstatic ListSplits a string into tokens around ','static ListSplits a string into tokens around the provided delimiterstatic StringjoinTokens(List tokens) Joins a list of tokens into a comma-delimited stringstatic StringjoinTokens(List tokens, String joinStr) Joins a list of tokens using provided delimiter.static booleanloginModuleEnabled(String loginModuleClass) NOT YET DOCUMENTEDstatic booleanpermitted(Subject subj, Permission p) NOT USED - returns true if provided subject has provided permissionstatic voidGets (and prints) the configuredLoginModules as list of loginModule class namesstatic voidshowSubject(Subject _mySubject) Debugging - prints a string representation of provided Subjectstatic voidshowSubject(Subject _mySubject, String msg) Debugging - prints a string representation of provided Subjec
-
Field Details
-
ldapClient
NOT YET DOCUMENTED
-
-
Constructor Details
-
AuthUtils
public AuthUtils()
-
-
Method Details
-
showSubject
Debugging - prints a string representation of provided Subject- Parameters:
_mySubject- the subject to display
-
showSubject
Debugging - prints a string representation of provided Subjec- Parameters:
_mySubject- the subject to displaymsg- a message to display along with subject
-
getConfiguredLoginModules
Gets the configuredLoginModules as list of loginModule class names- Returns:
- The configuredLoginModules value
-
reportConfiguredLoginModules
public static void reportConfiguredLoginModules()Gets (and prints) the configuredLoginModules as list of loginModule class names -
getConfiguredLoginModules
Gets the configuredLoginModules as list of loginModule class names, optionally printing if "verbose" is true.- Parameters:
verbose- to display configured modules- Returns:
- The configuredLoginModules value
-
getConfiguredLoginModule
Gets the the specified AppConfigurationEntry from the login configuration- Parameters:
loginModuleClass- class name of loginModule to get- Returns:
- The configuredLoginModule value
-
loginModuleEnabled
NOT YET DOCUMENTED- Parameters:
loginModuleClass- NOT YET DOCUMENTED- Returns:
- NOT YET DOCUMENTED
-
getPasswordFile
Gets the passwordFile attribute of the AuthUtils class- Returns:
- The passwordFile value
-
getLdapUserInfo
public static org.dom4j.Document getLdapUserInfo(String searchString, String ldapField) throws Exception Searches an LDAP directory and returns results in the form of a dom4j.Document. Used by UserInfoAction.NOTE: currently supports NSDL ldap only!
- Parameters:
searchString- the search stringldapField- either "cn" or "uid"- Returns:
- The ldapUserInfo value
- Throws:
Exception- NOT YET DOCUMENTED
-
getTokens
Splits a string into tokens around ','- Parameters:
s- the string to split- Returns:
- a list of tokens
-
getTokens
Splits a string into tokens around the provided delimiter- Parameters:
s- the string to splitdelimiter- string to split by- Returns:
- a list of tokens
-
joinTokens
Joins a list of tokens into a comma-delimited string- Parameters:
tokens- list to be joined- Returns:
- string of joined values
-
joinTokens
Joins a list of tokens using provided delimiter.- Parameters:
tokens- list to be joinedjoinStr- string to be inserted between tokens- Returns:
- string of joined tokens
-
permitted
NOT USED - returns true if provided subject has provided permission- Parameters:
subj- the subjectp- the permission- Returns:
- true if permitted
-