01: /*
02: * ====================================================================
03: * Copyright (c) 2004-2008 TMate Software Ltd. All rights reserved.
04: *
05: * This software is licensed as described in the file COPYING, which
06: * you should have received as part of this distribution. The terms
07: * are also available at http://svnkit.com/license.html
08: * If newer versions of this license are posted there, you may use a
09: * newer version instead, at your option.
10: * ====================================================================
11: */
12: package org.tmatesoft.svn.core.auth;
13:
14: import java.io.File;
15:
16: /**
17: * The <b>SVNSSLAuthentication</b> class represents user's credentials used
18: * to authenticate a user in secure connections. Used along with the
19: * {@link ISVNAuthenticationManager#SSL SSL} credential kind.
20: *
21: * @version 1.1.1
22: * @author TMate Software Ltd.
23: */
24: public class SVNSSLAuthentication extends SVNAuthentication {
25:
26: private File myCertificate;
27: private String myPassword;
28:
29: /**
30: * Creates an SSL credentials object.
31: *
32: * @param certFile user's certificate file
33: * @param password user's password
34: * @param storageAllowed to store or not this credential in a
35: * credentials cache
36: */
37: public SVNSSLAuthentication(File certFile, String password,
38: boolean storageAllowed) {
39: super (ISVNAuthenticationManager.SSL, null, storageAllowed);
40: myCertificate = certFile;
41: myPassword = password;
42: }
43:
44: /**
45: * Return a user's password.
46: *
47: * @return a password
48: */
49: public String getPassword() {
50: return myPassword;
51: }
52:
53: /**
54: * Returns a user's certificate file.
55: *
56: * @return certificate file
57: */
58: public File getCertificateFile() {
59: return myCertificate;
60: }
61: }
|