Package com.sun.identity.cot
Class COTUtils
- java.lang.Object
-
- com.sun.identity.cot.COTUtils
-
public class COTUtils extends Object
This class contains circle of trust utilities.
-
-
Field Summary
Fields Modifier and Type Field Description static Debugdebugstatic StringRESOURCE_BUNDLE_NAME
-
Constructor Summary
Constructors Constructor Description COTUtils()Default Constructor.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidfillEntriesInSet(Map attrMap, String key, String value)Adds a set of a given value to a map.static SetfindProtocolsForEntity(String entityId, String realm)Returns set of protocol the entity supports.static StringgetFirstEntry(Map attrMap, String key)Get the first value of set by given key searching in the given map.static booleanisValidProtocolType(String protocolType)Checks if the federation protocol type is valid.
-
-
-
Field Detail
-
RESOURCE_BUNDLE_NAME
public static final String RESOURCE_BUNDLE_NAME
- See Also:
- Constant Field Values
-
debug
public static Debug debug
-
-
Method Detail
-
getFirstEntry
public static String getFirstEntry(Map attrMap, String key)
Get the first value of set by given key searching in the given map. return null ifattrMapis null orkeyis null.- Parameters:
attrMap- Map of attributes name and their values in the circle of trust service. The key is the attribute name and the value is a Set.key- the attribute name to be retrieved.- Returns:
- the first value of the attribute in the value set.
-
fillEntriesInSet
public static void fillEntriesInSet(Map attrMap, String key, String value)
Adds a set of a given value to a map. Set will not be added ifattrMapis null orvalueis null orkeyis null.- Parameters:
attrMap- Map of which set is to be added.key- Key of the entry to be added.value- Value to be added to the Set.
-
isValidProtocolType
public static boolean isValidProtocolType(String protocolType)
Checks if the federation protocol type is valid. The valid values are IDFF or SAML2.- Parameters:
protocolType- the federation protocol type.- Returns:
- true if value is idff or saml2.
-
findProtocolsForEntity
public static Set findProtocolsForEntity(String entityId, String realm)
Returns set of protocol the entity supports.- Parameters:
entityId- The ID of the entity to be checked.realm- the realm in which the entity resides.- Returns:
- Set of protocol the entity supports, values could be
COTConstants.SAML2,COTConstants.IDFForCOTConstants.WS_FED.
-
-