use of org.wildfly.test.integration.security.picketlink.idm.credentials.CustomCredential in project wildfly by wildfly.
the class CustomCredentialHandlerTestCase method testCustomCredential.
@InSequence(99)
@Test
public void testCustomCredential() {
PartitionManager partitionManager = getPartitionManager();
IdentityManager identityManager = partitionManager.createIdentityManager();
CustomCredential credentials = new CustomCredential("valid_token");
identityManager.validateCredentials(credentials);
assertEquals(Credentials.Status.VALID, credentials.getStatus());
credentials = new CustomCredential("invalid_token");
identityManager.validateCredentials(credentials);
assertEquals(Credentials.Status.INVALID, credentials.getStatus());
}
Aggregations