Package ddf.security.sts.claimsHandler
Class AttributeMapLoader
java.lang.Object
ddf.security.sts.claimsHandler.AttributeMapLoader
Logic that handles loading attribute maps from an incoming format and returning it as a Map.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildClaimsMapFile(String attributeMapFile) Parses a file of attributes and returns them as a map.Determines the base DN for the providedPrincipal.getCredentials(Principal principal) Obtains the user name from the principal.
-
Constructor Details
-
AttributeMapLoader
public AttributeMapLoader(ddf.security.SubjectOperations subjectOperations)
-
-
Method Details
-
buildClaimsMapFile
Parses a file of attributes and returns them as a map.- Parameters:
attributeMapFile- File of the listed attributes- Returns:
- Map containing the fully populated attributes or empty map if file does not exist.
-
getUser
Obtains the user name from the principal.- Parameters:
principal- Describing the current user that should be used for retrieving claims.- Returns:
- the user name if the principal has one, null if no name is specified or if principal is null.
-
getBaseDN
Determines the base DN for the providedPrincipal.If an X500
Principalis provided, its base DN is extracted; however, if it is empty then then provideddefaultBaseDNis used instead.If any other type of
Principalis provided, thedefaultBaseDNis used.- Parameters:
principal- the Principal to checkdefaultBaseDN- the default DN to fall back to- Returns:
- the base DN
-
getCredentials
-