Package org.apache.airavata.credential.store.store.impl

Examples of org.apache.airavata.credential.store.store.impl.CredentialReaderImpl


* Factory class to create credential store readers.
*/
public class CredentialReaderFactory {

    public static CredentialReader createCredentialStoreReader(DBUtil dbUti) {
        return new CredentialReaderImpl(dbUti);
    }
View Full Code Here


      ClassNotFoundException, InstantiationException {
    String jdbcUrl = ServerSettings.getCredentialStoreDBURL();
    String jdbcUsr = ServerSettings.getCredentialStoreDBUser();
    String jdbcPass = ServerSettings.getCredentialStoreDBPassword();
    String driver = ServerSettings.getCredentialStoreDBDriver();
    return new CredentialReaderImpl(new DBUtil(jdbcUrl, jdbcUsr, jdbcPass,
        driver));
  }
View Full Code Here

  @Override
  public boolean isCredentialExist(String gatewayId, String tokenId)
      throws RegException {
    try {
      credentialReader = new CredentialReaderImpl(getDBConnector());
      SSHCredential credential = (SSHCredential) credentialReader.getCredential(gatewayId, tokenId);
        if (credential!=null) {
          return true;
        }
    } catch (ApplicationSettingsException e1) {
View Full Code Here

  @Override
  public String getCredentialPublicKey(String gatewayId, String tokenId)
      throws RegException {
    try {
      credentialReader = new CredentialReaderImpl(getDBConnector());
      SSHCredential credential = (SSHCredential) credentialReader.getCredential(gatewayId, tokenId);
        if (credential!=null) {
          return new String(credential.getPublicKey());
        }
    }catch (ApplicationSettingsException e1) {
View Full Code Here

        if (!enabled)
            return;

        // retrieve OA4MP credentials
        try {
            CredentialReader credentialReader = new CredentialReaderImpl(this.dbUtil);
            List<Credential> credentials = credentialReader.getAllCredentials();

            for(Credential credential : credentials) {
                if (credential instanceof CertificateCredential) {
                    CertificateCredential certificateCredential = (CertificateCredential)credential;
View Full Code Here

        RequestData requestData = new RequestData();
        requestData.setMyProxyServerUrl("myproxy.teragrid.org");
        requestData.setMyProxyUserName(System.getProperty("myproxy.user"));
        requestData.setMyProxyPassword(System.getProperty("myproxy.password"));
        requestData.setMyProxyLifeTime(3600);
        CredentialReader credentialReader = new CredentialReaderImpl(getDbUtil());
        return new GSISecurityContext(credentialReader, requestData);
    }
View Full Code Here

     * @throws InstantiationException If an error occurred while instantiating jdbc driver
     * @throws IllegalAccessException A security exception accessing jdbc driver.
     */
    public static CredentialReader createCredentialStoreReader() throws ClassNotFoundException,
            ApplicationSettingsException, InstantiationException, IllegalAccessException {
        return new CredentialReaderImpl(DBUtil.getCredentialStoreDBUtil());
    }
View Full Code Here

     * Creates a credential reader using supplied database configurations.
     * @param dbUti The database configurations.
     * @return CredentialReader object.
     */
    public static CredentialReader createCredentialStoreReader(DBUtil dbUti) throws ApplicationSettingsException {
        return new CredentialReaderImpl(dbUti);
    }
View Full Code Here

  @Override
  public boolean isCredentialExist(String gatewayId, String tokenId)
      throws RegException {
    try {
      credentialReader = new CredentialReaderImpl(getDBConnector());
      SSHCredential credential = (SSHCredential) credentialReader.getCredential(gatewayId, tokenId);
        if (credential!=null) {
          return true;
        }
    } catch (ApplicationSettingsException e1) {
View Full Code Here

  @Override
  public String getCredentialPublicKey(String gatewayId, String tokenId)
      throws RegException {
    try {
      credentialReader = new CredentialReaderImpl(getDBConnector());
      SSHCredential credential = (SSHCredential) credentialReader.getCredential(gatewayId, tokenId);
        if (credential!=null) {
          return new String(credential.getPublicKey());
        }
    }catch (ApplicationSettingsException e1) {
View Full Code Here

TOP

Related Classes of org.apache.airavata.credential.store.store.impl.CredentialReaderImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.