Package org.cilogon.oauth2.servlet.util
Class DNUtil
- java.lang.Object
-
- org.cilogon.oauth2.servlet.util.DNUtil
-
public class DNUtil extends Object
A utility for computing distinguished names. Since we are accumulating a slew of these, this organizes them and their logic.Created by Jeff Gaynor
on 5/14/12 at 8:44 AM
-
-
Field Summary
Fields Modifier and Type Field Description protected static boolean
computeFNAL
protected static int
DEFAULT_CASE
protected static int
FNL_CASE
protected static int
LIGO_CASE
static String
LIGO_IDP
protected static int
OPENID_CASE
-
Constructor Summary
Constructors Constructor Description DNUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
encodeCertName(String[] names)
Each component of the name needs to be utf-7 encoded.protected static int
getCase(User user)
protected static String
getDefaultDN(User user, boolean returnEmail)
static String
getDN(User user, AbstractCILServiceTransaction transaction, boolean returnEmail)
protected static String
getFNLDN(User user, boolean returnEmail)
protected static String
getLIGODN(User user, boolean returnEmail)
static boolean
isComputeFNAL()
static void
main(String[] args)
protected static String
newUTF7(String inString)
protected static String
oldUTF7(String inString)
Convert a string to UTF 7 if it has not been already converted.static void
setComputeFNAL(boolean computeFNAL)
protected static String
toUTF7(String inString)
Converts a String to its UTF7 equivalent and returns that.
-
-
-
Field Detail
-
LIGO_IDP
public static final String LIGO_IDP
- See Also:
- Constant Field Values
-
DEFAULT_CASE
protected static final int DEFAULT_CASE
- See Also:
- Constant Field Values
-
LIGO_CASE
protected static final int LIGO_CASE
- See Also:
- Constant Field Values
-
OPENID_CASE
protected static final int OPENID_CASE
- See Also:
- Constant Field Values
-
computeFNAL
protected static boolean computeFNAL
-
FNL_CASE
protected static final int FNL_CASE
- See Also:
- Constant Field Values
-
-
Method Detail
-
isComputeFNAL
public static boolean isComputeFNAL()
-
setComputeFNAL
public static void setComputeFNAL(boolean computeFNAL)
-
getCase
protected static int getCase(User user)
-
getDN
public static String getDN(User user, AbstractCILServiceTransaction transaction, boolean returnEmail)
-
encodeCertName
public static String encodeCertName(String[] names)
Each component of the name needs to be utf-7 encoded.- Parameters:
names
-- Returns:
-
toUTF7
protected static String toUTF7(String inString)
Converts a String to its UTF7 equivalent and returns that. E.g. A string like
Шоста@和楽器.com
would be returned as
+BCgEPgRBBEIEMABAVIxpfVZo.com- Parameters:
inString
-- Returns:
-
oldUTF7
protected static String oldUTF7(String inString)
Convert a string to UTF 7 if it has not been already converted.- Parameters:
inString
-- Returns:
-
main
public static void main(String[] args)
-
-