Package org.globus.myproxy

Examples of org.globus.myproxy.MyProxy


    public GSSCredential renewProxy() throws XregistryException{
      init();
        try {
            String proxyloc = null;
            MyProxy myproxy = new MyProxy( hostname, port );
            GSSCredential proxy =
                myproxy.get(username, password, lifetime);


            GlobusCredential globusCred = null;
            if(proxy instanceof GlobusGSSCredentialImpl) {
                globusCred =
View Full Code Here


            }
        } else {
            port = MyProxy.DEFAULT_PORT;
        }

        this.myproxyClient = new MyProxy(hostname, port);
    }
View Full Code Here

    public GSSCredential renewProxy() throws MyProxyException, IOException {

        init();
        String proxyloc = null;
        MyProxy myproxy = new MyProxy(hostname, port);
        GSSCredential proxy = myproxy.get(username, password, lifetime);
        GlobusCredential globusCred = null;
        if (proxy instanceof GlobusGSSCredentialImpl) {
            globusCred = ((GlobusGSSCredentialImpl) proxy).getGlobusCredential();
            log.debug("got proxy from myproxy for " + username + " with " + lifetime + " lifetime.");
            String uid = username;
View Full Code Here

     * Gets the default proxy certificate.
     * @return Default my proxy credentials.
     * @throws GFacException If an error occurred while retrieving credentials.
     */
    public GSSCredential getDefaultCredentials() throws GFacException{
        MyProxy myproxy = new MyProxy(getRequestData().getMyProxyServerUrl(), getRequestData().getMyProxyPort());
        try {
            return myproxy.get(getRequestData().getMyProxyUserName(), getRequestData().getMyProxyPassword(),
                    getRequestData().getMyProxyLifeTime());
        } catch (MyProxyException e) {
            throw new GFacException("An error occurred while retrieving default security credentials.", e);
        }
    }
View Full Code Here

     * @return The short lived GSSCredentials
     * @throws GFacException If an error is occurred while retrieving credentials.
     */
    public GSSCredential getProxyCredentials() throws GFacException {

        MyProxy myproxy = new MyProxy(getRequestData().getMyProxyServerUrl(), getRequestData().getMyProxyPort());
        try {
            return myproxy.get(gssCredentials, getRequestData().getMyProxyUserName(), getRequestData().getMyProxyPassword(),
                    getRequestData().getMyProxyLifeTime());
        } catch (MyProxyException e) {
            throw new GFacException("An error occurred while renewing security credentials using user/password.", e);
        }
    }
View Full Code Here

     * > myproxy-init -A --cert /tmp/x509up_u501 --key /tmp/x509up_u501 -l ogce -s myproxy.teragrid.org
     * @return  Renewed credentials.
     * @throws GFacException If an error occurred while renewing credentials.
     */
    public GSSCredential renewCredentialsAsATrustedHost() throws GFacException {
        MyProxy myproxy = new MyProxy(getRequestData().getMyProxyServerUrl(), getRequestData().getMyProxyPort());

        GetParams getParams = new GetParams();
        getParams.setAuthzCreds(gssCredentials);
        getParams.setUserName(getRequestData().getMyProxyUserName());
        getParams.setLifetime(getRequestData().getMyProxyLifeTime());

        try {
            return myproxy.get(gssCredentials, getParams);
        } catch (MyProxyException e) {
            throw new GFacException("An error occurred while renewing security credentials.", e);
        }
    }
View Full Code Here

    // not thread safe
    public GSSCredential renewProxy() throws MyProxyException, IOException {
        init();
       
        String proxyLocation = null;
        MyProxy myproxy = new MyProxy(hostname, port);
        GSSCredential proxy = myproxy.get(username, password, lifetime);
        GlobusCredential globusCred = null;
        if (proxy instanceof GlobusGSSCredentialImpl) {
            globusCred = ((GlobusGSSCredentialImpl) proxy).getGlobusCredential();
            log.debug("got proxy from myproxy for " + username + " with " + lifetime + " lifetime.");
            String uid = username;
View Full Code Here

   
    // this should be reused by the above method
    public GlobusCredential getGlobusCredential() throws Exception{
    init();
    String proxyloc = null;
    MyProxy myproxy = new MyProxy(hostname, port);
    GSSCredential proxy = myproxy.get(username, password, lifetime);
    GlobusCredential globusCred = null;
    if (proxy instanceof GlobusGSSCredentialImpl) {
      globusCred = ((GlobusGSSCredentialImpl) proxy)
          .getGlobusCredential();
      log.debug("got proxy from myproxy for " + username + " with "
View Full Code Here

            }
            if (port <= 0) {
                port = MyProxy.DEFAULT_PORT;
            }
        }
        return new MyProxy(hostname, port);
    }
View Full Code Here

                myproxyPort = Integer.parseInt(myproxyPortStr);
            } catch (NumberFormatException e) {
                log.error(e.getMessage());
            }
        }
        this.myproxyClient = new MyProxy(myproxyServer, myproxyPort);
    }
View Full Code Here

TOP

Related Classes of org.globus.myproxy.MyProxy

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.