Search in sources :

Example 6 with PasswordCapabilityType

use of com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.PasswordCapabilityType in project midpoint by Evolveum.

the class TestDBTable method test001Connection.

@Test
public void test001Connection() throws Exception {
    final String TEST_NAME = "test001Connection";
    TestUtil.displayTestTile(TEST_NAME);
    Task task = createTask(TEST_NAME);
    OperationResult result = task.getResult();
    // WHEN
    OperationResult testResult = provisioningService.testResource(RESOURCE_DERBY_OID, task);
    display("Test result", testResult);
    TestUtil.assertSuccess("Test resource failed (result)", testResult);
    ResourceType resource = repositoryService.getObject(ResourceType.class, RESOURCE_DERBY_OID, null, result).asObjectable();
    display("Resource after test", resource);
    display("Resource after test (XML)", PrismTestUtil.serializeObjectToString(resource.asPrismObject(), PrismContext.LANG_XML));
    List<Object> nativeCapabilities = resource.getCapabilities().getNative().getAny();
    CredentialsCapabilityType credentialsCapabilityType = CapabilityUtil.getCapability(nativeCapabilities, CredentialsCapabilityType.class);
    assertNotNull("No credentials capability", credentialsCapabilityType);
    PasswordCapabilityType passwordCapabilityType = credentialsCapabilityType.getPassword();
    assertNotNull("No password in credentials capability", passwordCapabilityType);
    assertEquals("Wrong password capability ReturnedByDefault", Boolean.FALSE, passwordCapabilityType.isReturnedByDefault());
}
Also used : Task(com.evolveum.midpoint.task.api.Task) PasswordCapabilityType(com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.PasswordCapabilityType) CredentialsCapabilityType(com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.CredentialsCapabilityType) OperationResult(com.evolveum.midpoint.schema.result.OperationResult) ResourceType(com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceType) PrismObject(com.evolveum.midpoint.prism.PrismObject) AbstractIntegrationTest(com.evolveum.midpoint.test.AbstractIntegrationTest) Test(org.testng.annotations.Test)

Example 7 with PasswordCapabilityType

use of com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.PasswordCapabilityType in project midpoint by Evolveum.

the class AbstractBasicDummyTest method assertNativeCredentialsCapability.

protected void assertNativeCredentialsCapability(CredentialsCapabilityType capCred) {
    PasswordCapabilityType passwordCapabilityType = capCred.getPassword();
    assertNotNull("password native capability not present", passwordCapabilityType);
    Boolean readable = passwordCapabilityType.isReadable();
    if (readable != null) {
        assertFalse("Unexpected 'readable' in password capability", readable);
    }
}
Also used : PasswordCapabilityType(com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.PasswordCapabilityType)

Example 8 with PasswordCapabilityType

use of com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.PasswordCapabilityType in project midpoint by Evolveum.

the class TestDummyIncomplete method assertNativeCredentialsCapability.

@Override
protected void assertNativeCredentialsCapability(CredentialsCapabilityType capCred) {
    PasswordCapabilityType passwordCapabilityType = capCred.getPassword();
    assertNotNull("password native capability not present", passwordCapabilityType);
    Boolean readable = passwordCapabilityType.isReadable();
    assertNotNull("No 'readable' inducation in password capability", readable);
    assertTrue("Password not 'readable' in password capability", readable);
}
Also used : PasswordCapabilityType(com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.PasswordCapabilityType)

Aggregations

PasswordCapabilityType (com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.PasswordCapabilityType)8 CredentialsCapabilityType (com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.CredentialsCapabilityType)5 PrismObject (com.evolveum.midpoint.prism.PrismObject)3 ActivationCapabilityType (com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.ActivationCapabilityType)3 OperationResult (com.evolveum.midpoint.schema.result.OperationResult)2 Task (com.evolveum.midpoint.task.api.Task)2 ResourceType (com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceType)2 ActivationStatusCapabilityType (com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.ActivationStatusCapabilityType)2 CreateCapabilityType (com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.CreateCapabilityType)2 DeleteCapabilityType (com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.DeleteCapabilityType)2 PagedSearchCapabilityType (com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.PagedSearchCapabilityType)2 ReadCapabilityType (com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.ReadCapabilityType)2 UpdateCapabilityType (com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.UpdateCapabilityType)2 Test (org.testng.annotations.Test)2 AbstractIntegrationTest (com.evolveum.midpoint.test.AbstractIntegrationTest)1 CapabilityCollectionType (com.evolveum.midpoint.xml.ns._public.common.common_3.CapabilityCollectionType)1 ActivationLockoutStatusCapabilityType (com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.ActivationLockoutStatusCapabilityType)1 ActivationValidityCapabilityType (com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.ActivationValidityCapabilityType)1 AddRemoveAttributeValuesCapabilityType (com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.AddRemoveAttributeValuesCapabilityType)1 AuxiliaryObjectClassesCapabilityType (com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.AuxiliaryObjectClassesCapabilityType)1