Class AttributeMapLoader

java.lang.Object
ddf.security.sts.claimsHandler.AttributeMapLoader

public class AttributeMapLoader extends Object
Logic that handles loading attribute maps from an incoming format and returning it as a Map.
  • Constructor Details

    • AttributeMapLoader

      public AttributeMapLoader(ddf.security.SubjectOperations subjectOperations)
  • Method Details

    • buildClaimsMapFile

      public Map<String,String> buildClaimsMapFile(String attributeMapFile)
      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

      public String getUser(Principal principal)
      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

      public String getBaseDN(Principal principal, String defaultBaseDN, boolean overrideCertDn)
      Determines the base DN for the provided Principal.

      If an X500 Principal is provided, its base DN is extracted; however, if it is empty then then provided defaultBaseDN is used instead.

      If any other type of Principal is provided, the defaultBaseDN is used.

      Parameters:
      principal - the Principal to check
      defaultBaseDN - the default DN to fall back to
      Returns:
      the base DN
    • getCredentials

      public String getCredentials(Principal principal)