View Javadoc
1   package org.apache.maven.wagon.authentication;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *   http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  import java.io.Serializable;
23  
24  /**
25   * This class holds the set of properties used when instance of the <code>Wagon</code>
26   * will use during login operation.
27   *
28   * @author <a href="michal.maczka@dimatics.com">Michal Maczka</a>
29   *
30   */
31  public class AuthenticationInfo
32      implements Serializable
33  {
34  
35      /**
36       * Username used to login to the host
37       */
38      private String userName;
39  
40      /**
41       * Password associated with the login
42       */
43      private String password;
44  
45      /**
46       * Passphrase of the user's private key file
47       */
48      private String passphrase;
49  
50      /**
51       * The absolute path to private key file
52       */
53      private String privateKey;
54  
55      /**
56       * Get the passphrase of the private key file. The passphrase is used only
57       * when host/protocol supports authentication via exchange of
58       * private/public keys and private key was used for authentication.
59       *
60       * @return passphrase of the private key file
61       */
62      public String getPassphrase()
63      {
64          return passphrase;
65      }
66  
67      /**
68       * Set the passphrase of the private key file.
69       *
70       * @param passphrase passphrase of the private key file
71       */
72      public void setPassphrase( final String passphrase )
73      {
74          this.passphrase = passphrase;
75      }
76  
77      /**
78       * Get the absolute path to the private key file.
79       *
80       * @return absolute path to private key
81       */
82      public String getPrivateKey()
83      {
84          return privateKey;
85      }
86  
87      /**
88       * Set the absolute path to private key file.
89       *
90       * @param privateKey path to private key in local file system
91       */
92      public void setPrivateKey( final String privateKey )
93      {
94          this.privateKey = privateKey;
95      }
96  
97      /**
98       * Get the user's password which is used when connecting to the repository.
99       *
100      * @return password of user
101      */
102     public String getPassword()
103     {
104         return password;
105     }
106 
107     /**
108      * Set the user's password which is used when connecting to the repository.
109      *
110      * @param password password of the user
111      */
112     public void setPassword( final String password )
113     {
114         this.password = password;
115     }
116 
117     /**
118      * Get the username used to access the repository.
119      *
120      * @return username at repository
121      */
122     public String getUserName()
123     {
124         return userName;
125     }
126 
127     /**
128      * Set username used to access the repository.
129      *
130      * @param userName the username used to access repository
131      */
132     public void setUserName( final String userName )
133     {
134         this.userName = userName;
135     }
136 }