Interface CredentialRequirementManagement


  • public interface CredentialRequirementManagement
    API for CredentialRequirements management.
    Author:
    K. Benedyczak
    • Field Detail

      • DEFAULT_CREDENTIAL_REQUIREMENT

        static final java.lang.String DEFAULT_CREDENTIAL_REQUIREMENT
        See Also:
        Constant Field Values
    • Method Detail

      • addCredentialRequirement

        void addCredentialRequirement​(pl.edu.icm.unity.types.authn.CredentialRequirements updated)
                               throws pl.edu.icm.unity.exceptions.EngineException
        Defines a new credential requirements instance
        Parameters:
        name -
        credentials -
        description -
        Throws:
        pl.edu.icm.unity.exceptions.EngineException
      • updateCredentialRequirement

        void updateCredentialRequirement​(pl.edu.icm.unity.types.authn.CredentialRequirements updated)
                                  throws pl.edu.icm.unity.exceptions.EngineException
        Updated a definitions of credential set.
        Parameters:
        updated - updated data. The existing one is matched by id.
        Throws:
        pl.edu.icm.unity.exceptions.EngineException
      • removeCredentialRequirement

        void removeCredentialRequirement​(java.lang.String toRemove,
                                         java.lang.String replacementId)
                                  throws pl.edu.icm.unity.exceptions.EngineException
        Removes the given credential set definition. The second argument is used to get another existing set, to replace the removed one where it is used. It can be null only if the removed set is not used otherwise an exception is thrown. If the replacementId is not null, then the replacementAuthnState governs the desired overall authentication state of the entities which have their credential requirements modified. For details see #updateCredentialRequirement(CredentialRequirements, LocalAuthenticationState) - the semantics is the same here.
        Parameters:
        toRemove - credential requirement to remove
        replacementId - credential requirement to be applied to entities that used the removed requirement. Can be null, but then the operation will be successful only if there was no entity with the requirement.
        Throws:
        pl.edu.icm.unity.exceptions.EngineException
      • getCredentialRequirements

        java.util.Collection<pl.edu.icm.unity.types.authn.CredentialRequirements> getCredentialRequirements()
                                                                                                     throws pl.edu.icm.unity.exceptions.EngineException
        Returns:
        collection of existing credential requirements
        Throws:
        pl.edu.icm.unity.exceptions.EngineException
      • getCredentialRequirements

        pl.edu.icm.unity.types.authn.CredentialRequirements getCredentialRequirements​(java.lang.String name)
                                                                               throws pl.edu.icm.unity.exceptions.EngineException
        Returns:
        existing credential requirement
        Throws:
        pl.edu.icm.unity.exceptions.EngineException