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 booleancomputeFNALprotected static intDEFAULT_CASEprotected static intFNL_CASEprotected static intLIGO_CASEstatic StringLIGO_IDPprotected static intOPENID_CASE
-
Constructor Summary
Constructors Constructor Description DNUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringencodeCertName(String[] names)Each component of the name needs to be utf-7 encoded.protected static intgetCase(User user)protected static StringgetDefaultDN(User user, boolean returnEmail)static StringgetDN(User user, AbstractCILServiceTransaction transaction, boolean returnEmail)protected static StringgetFNLDN(User user, boolean returnEmail)protected static StringgetLIGODN(User user, boolean returnEmail)static booleanisComputeFNAL()static voidmain(String[] args)protected static StringnewUTF7(String inString)protected static StringoldUTF7(String inString)Convert a string to UTF 7 if it has not been already converted.static voidsetComputeFNAL(boolean computeFNAL)protected static StringtoUTF7(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)
-
-