package net.deterlab.abac;
import java.io.*;
import java.util.*;
/**
* XXX:
* An ABAC credential, with or without an underlying certificate that
* represents it. These are edges in proof graphs and can be constructed from
* their constituent Roles.
* @author ISI ABAC team
* @version 1.3
*/
public class CredentialFactory {
// XXX register and extend
static Credential[] newInstance(File fn, Set ids) {
Credential rv = null;
try {
rv = new X509Credential(fn, ids);
}
catch (Exception e ) {
rv = null;
}
try {
rv = new GENICredential(fn, ids);
}
catch (Exception e ) {
rv = null;
}
if ( rv != null )
return new Credential[] { rv };
else
return null;
}
static Credential[] newInstance(String fn, Set ids) {
return newInstance(new File(fn), ids);
}
}