Commit 7e2a082d authored by adrian.damian@nrc.ca's avatar adrian.damian@nrc.ca
Browse files

Added getCertificate with lifetime

git-svn-id: https://opencadc.googlecode.com/svn/trunk@1127 728ff76a-78ac-11de-a72b-d90af8dea425
parent a8854c60
Loading
Loading
Loading
Loading
+23 −2
Original line number Diff line number Diff line
@@ -98,9 +98,10 @@ public class CredPrivateClient

    /**
     * Method that returns a X509CertificateChain in accordance to
     * Subject's credentials. Subclasses must implement this class;
     * Subject's credentials. The lifetime of the certificate is the default
     * one generated by the server. Subclasses must implement this class;
     * 
     * @return a certificate according to user's (Subject) credentials.
     * @return a certificate corresponding user's (Subject) credentials.
     * @throws CertificateException
     * @throws AuthorizationException -
     *             user not authorize to access resource
@@ -112,6 +113,26 @@ public class CredPrivateClient
                "To be implemented in the subclass");
    }
    
    /**
     * Method that returns a X509CertificateChain in accordance to
     * Subject's credentials. The lifetime of the certificate is specified. 
     * Subclasses must implement this class;
     * 
     * @param daysValid requested lifetime for the proxy certificate
     * @return a certificate corresponding user's (Subject) credentials 
     * matching the requested lifetime or null if such a certificate does 
     * not exist and cannot be created.
     * @throws CertificateException
     * @throws AuthorizationException -
     *             user not authorize to access resource
     */
    public X509CertificateChain getCertificate(float daysValid)
            throws AuthorizationException, CertificateException
    {
        throw new UnsupportedOperationException(
                "To be implemented in the subclass");
    }

    protected URL getBaseServiceURL()
    {
        return baseServiceURL;