Class ScriptedIdentity


  • public class ScriptedIdentity
    extends Object
    A wrapper class to limit an authentication script's exposure to a AmIdentity object
    • Constructor Detail

      • ScriptedIdentity

        public ScriptedIdentity​(AMIdentity amIdentity)
        The constructor for the ScriptedIdentity object
        Parameters:
        amIdentity - The amIdentity object containing the user information
    • Method Detail

      • getAttribute

        public Set getAttribute​(String attributeName)
        Retrieves a particular attribute's value
        Parameters:
        attributeName - The name of the attribute to be retrieved
        Returns:
        The value of the attribute
      • setAttribute

        public void setAttribute​(String attributeName,
                                 Object[] attributeValues)
        Sets the attribute's values. If the attribute already exists all existing values will be overridden. If it doesn't exist, it will be created.
        Parameters:
        attributeName - The name of the attribute
        attributeValues - The values of the attribute
      • addAttribute

        public void addAttribute​(String attributeName,
                                 String attributeValue)
      • store

        public void store()
        Persists the current state of the user's attributes