public class AuthUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static NSDLLdapClient |
ldapClient
NOT YET DOCUMENTED
|
Constructor and Description |
---|
AuthUtils() |
Modifier and Type | Method and Description |
---|---|
static javax.security.auth.login.AppConfigurationEntry |
getConfiguredLoginModule(java.lang.String loginModuleClass)
Gets the the specified AppConfigurationEntry from the login configuration
|
static java.util.List |
getConfiguredLoginModules()
Gets the configuredLoginModules as list of loginModule class names
|
static java.util.List |
getConfiguredLoginModules(boolean verbose)
Gets the configuredLoginModules as list of loginModule class names,
optionally printing if "verbose" is true.
|
static org.dom4j.Document |
getLdapUserInfo(java.lang.String searchString,
java.lang.String ldapField)
Searches an LDAP directory and returns results in the form of a
dom4j.Document.
|
static java.lang.String |
getPasswordFile()
Gets the passwordFile attribute of the AuthUtils class
|
static java.util.List |
getTokens(java.lang.String s)
Splits a string into tokens around ','
|
static java.util.List |
getTokens(java.lang.String s,
java.lang.String delimiter)
Splits a string into tokens around the provided delimiter
|
static java.lang.String |
joinTokens(java.util.List tokens)
Joins a list of tokens into a comma-delimited string
|
static java.lang.String |
joinTokens(java.util.List tokens,
java.lang.String joinStr)
Joins a list of tokens using provided delimiter.
|
static boolean |
loginModuleEnabled(java.lang.String loginModuleClass)
NOT YET DOCUMENTED
|
static boolean |
permitted(javax.security.auth.Subject subj,
java.security.Permission p)
NOT USED - returns true if provided subject has provided permission
|
static void |
reportConfiguredLoginModules()
Gets (and prints) the configuredLoginModules as list of loginModule class
names
|
static void |
showSubject(javax.security.auth.Subject _mySubject)
Debugging - prints a string representation of provided Subject
|
static void |
showSubject(javax.security.auth.Subject _mySubject,
java.lang.String msg)
Debugging - prints a string representation of provided Subjec
|
public static NSDLLdapClient ldapClient
public static void showSubject(javax.security.auth.Subject _mySubject)
_mySubject
- the subject to displaypublic static void showSubject(javax.security.auth.Subject _mySubject, java.lang.String msg)
_mySubject
- the subject to displaymsg
- a message to display along with subjectpublic static java.util.List getConfiguredLoginModules()
public static void reportConfiguredLoginModules()
public static java.util.List getConfiguredLoginModules(boolean verbose)
verbose
- to display configured modulespublic static javax.security.auth.login.AppConfigurationEntry getConfiguredLoginModule(java.lang.String loginModuleClass)
loginModuleClass
- class name of loginModule to getpublic static boolean loginModuleEnabled(java.lang.String loginModuleClass)
loginModuleClass
- NOT YET DOCUMENTEDpublic static java.lang.String getPasswordFile()
public static org.dom4j.Document getLdapUserInfo(java.lang.String searchString, java.lang.String ldapField) throws java.lang.Exception
NOTE: currently supports NSDL ldap only!
searchString
- the search stringldapField
- either "cn" or "uid"java.lang.Exception
- NOT YET DOCUMENTEDpublic static java.util.List getTokens(java.lang.String s)
s
- the string to splitpublic static java.util.List getTokens(java.lang.String s, java.lang.String delimiter)
s
- the string to splitdelimiter
- string to split bypublic static java.lang.String joinTokens(java.util.List tokens)
tokens
- list to be joinedpublic static java.lang.String joinTokens(java.util.List tokens, java.lang.String joinStr)
tokens
- list to be joinedjoinStr
- string to be inserted between tokenspublic static boolean permitted(javax.security.auth.Subject subj, java.security.Permission p)
subj
- the subjectp
- the permission