Package pl.edu.icm.unity.engine.api
Interface CredentialManagement
-
public interface CredentialManagement
Credential management API- Author:
- K. Benedyczak
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_CREDENTIAL
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addCredentialDefinition(pl.edu.icm.unity.types.authn.CredentialDefinition credentialDefinition)
Defines a new credential definition, so it can be assigned to entities via credential requirements and to local authenticators.pl.edu.icm.unity.types.authn.CredentialDefinition
getCredentialDefinition(java.lang.String name)
java.util.Collection<pl.edu.icm.unity.types.authn.CredentialDefinition>
getCredentialDefinitions()
java.util.Collection<pl.edu.icm.unity.types.authn.CredentialType>
getCredentialTypes()
void
removeCredentialDefinition(java.lang.String toRemove)
Removes the given credential definition.void
updateCredentialDefinition(pl.edu.icm.unity.types.authn.CredentialDefinition updated, pl.edu.icm.unity.types.authn.LocalCredentialState desiredCredState)
Updates a definition of a credential.
-
-
-
Field Detail
-
DEFAULT_CREDENTIAL
static final java.lang.String DEFAULT_CREDENTIAL
- See Also:
- Constant Field Values
-
-
Method Detail
-
getCredentialTypes
java.util.Collection<pl.edu.icm.unity.types.authn.CredentialType> getCredentialTypes() throws pl.edu.icm.unity.exceptions.EngineException
- Returns:
- list of available credential types.
- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
addCredentialDefinition
void addCredentialDefinition(pl.edu.icm.unity.types.authn.CredentialDefinition credentialDefinition) throws pl.edu.icm.unity.exceptions.EngineException
Defines a new credential definition, so it can be assigned to entities via credential requirements and to local authenticators.- Parameters:
credentialDefinition
-- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
updateCredentialDefinition
void updateCredentialDefinition(pl.edu.icm.unity.types.authn.CredentialDefinition updated, pl.edu.icm.unity.types.authn.LocalCredentialState desiredCredState) throws pl.edu.icm.unity.exceptions.EngineException
Updates a definition of a credential.- Parameters:
updated
- updated data. The existing one is matched by name.desiredCredState
- The desired credential state to be applied to entities which have this credential currently set. If value is 'correct', then the operation will be successful only if all entities which have this credential are fulfilling the new rules. If the value is 'outdated' then all identities which have this credential set will have the state changed to 'valid' if their credentials fulfill the rules of the new requirements or to 'outdated' otherwise. The 'notSet' value means that the current credentials should have their values cleared.- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
removeCredentialDefinition
void removeCredentialDefinition(java.lang.String toRemove) throws pl.edu.icm.unity.exceptions.EngineException
Removes the given credential definition. The operation will be successful only if the credential is not used by neither existing authenticators nor existing credential requirements.- Parameters:
toRemove
-- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
getCredentialDefinitions
java.util.Collection<pl.edu.icm.unity.types.authn.CredentialDefinition> getCredentialDefinitions() throws pl.edu.icm.unity.exceptions.EngineException
- Returns:
- collection of existing credential definitions
- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
getCredentialDefinition
pl.edu.icm.unity.types.authn.CredentialDefinition getCredentialDefinition(java.lang.String name) throws pl.edu.icm.unity.exceptions.EngineException
- Returns:
- Credential definition with given name
- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
-