Search in sources :

Example 26 with CredentialsType

use of com.evolveum.midpoint.xml.ns._public.common.common_3.CredentialsType in project midpoint by Evolveum.

the class TestDummyIncomplete method checkAccountWill.

@Override
protected void checkAccountWill(PrismObject<ShadowType> shadow, OperationResult result, XMLGregorianCalendar startTs, XMLGregorianCalendar endTs) throws SchemaException, EncryptionException {
    super.checkAccountWill(shadow, result, startTs, endTs);
    CredentialsType credentials = shadow.asObjectable().getCredentials();
    assertNotNull("No credentials in " + shadow, credentials);
    PasswordType password = credentials.getPassword();
    assertNotNull("No password in " + shadow, password);
    PrismContainerValue<PasswordType> passwordContainerValue = password.asPrismContainerValue();
    PrismProperty<ProtectedStringType> valueProperty = passwordContainerValue.findProperty(PasswordType.F_VALUE);
    assertTrue("Unexpected password value in " + shadow + ": " + valueProperty, valueProperty.getValues().isEmpty());
    assertTrue("No incompleteness in password value in " + shadow + ": " + valueProperty, valueProperty.isIncomplete());
}
Also used : CredentialsType(com.evolveum.midpoint.xml.ns._public.common.common_3.CredentialsType) PasswordType(com.evolveum.midpoint.xml.ns._public.common.common_3.PasswordType) ProtectedStringType(com.evolveum.prism.xml.ns._public.types_3.ProtectedStringType)

Aggregations

CredentialsType (com.evolveum.midpoint.xml.ns._public.common.common_3.CredentialsType)25 PasswordType (com.evolveum.midpoint.xml.ns._public.common.common_3.PasswordType)15 UserType (com.evolveum.midpoint.xml.ns._public.common.common_3.UserType)15 ProtectedStringType (com.evolveum.prism.xml.ns._public.types_3.ProtectedStringType)15 Test (org.testng.annotations.Test)11 OperationResult (com.evolveum.midpoint.schema.result.OperationResult)9 Task (com.evolveum.midpoint.task.api.Task)9 ItemPath (com.evolveum.midpoint.prism.path.ItemPath)7 PolyString (com.evolveum.midpoint.prism.polystring.PolyString)6 PrismReferenceValue (com.evolveum.midpoint.prism.PrismReferenceValue)5 SchemaException (com.evolveum.midpoint.util.exception.SchemaException)4 PrismContainerDefinition (com.evolveum.midpoint.prism.PrismContainerDefinition)2 PrismPropertyDefinition (com.evolveum.midpoint.prism.PrismPropertyDefinition)2 CommunicationException (com.evolveum.midpoint.util.exception.CommunicationException)2 ConfigurationException (com.evolveum.midpoint.util.exception.ConfigurationException)2 ExpressionEvaluationException (com.evolveum.midpoint.util.exception.ExpressionEvaluationException)2 ObjectAlreadyExistsException (com.evolveum.midpoint.util.exception.ObjectAlreadyExistsException)2 ObjectNotFoundException (com.evolveum.midpoint.util.exception.ObjectNotFoundException)2 SecurityViolationException (com.evolveum.midpoint.util.exception.SecurityViolationException)2 PasswordHistoryEntryType (com.evolveum.midpoint.xml.ns._public.common.common_3.PasswordHistoryEntryType)2