001package org.apache.maven.wagon.authentication;
002
003/*
004 * Licensed to the Apache Software Foundation (ASF) under one
005 * or more contributor license agreements.  See the NOTICE file
006 * distributed with this work for additional information
007 * regarding copyright ownership.  The ASF licenses this file
008 * to you under the Apache License, Version 2.0 (the
009 * "License"); you may not use this file except in compliance
010 * with the License.  You may obtain a copy of the License at
011 *
012 *   http://www.apache.org/licenses/LICENSE-2.0
013 *
014 * Unless required by applicable law or agreed to in writing,
015 * software distributed under the License is distributed on an
016 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
017 * KIND, either express or implied.  See the License for the
018 * specific language governing permissions and limitations
019 * under the License.
020 */
021
022import java.io.Serializable;
023
024/**
025 * This class holds the set of properties used when instance of the <code>Wagon</code>
026 * will use during login operation.
027 *
028 * @author <a href="michal.maczka@dimatics.com">Michal Maczka</a>
029 *
030 */
031public class AuthenticationInfo
032    implements Serializable
033{
034
035    /**
036     * Username used to login to the host
037     */
038    private String userName;
039
040    /**
041     * Password associated with the login
042     */
043    private String password;
044
045    /**
046     * Passphrase of the user's private key file
047     */
048    private String passphrase;
049
050    /**
051     * The absolute path to private key file
052     */
053    private String privateKey;
054
055    /**
056     * Get the passphrase of the private key file. The passphrase is used only
057     * when host/protocol supports authentication via exchange of
058     * private/public keys and private key was used for authentication.
059     *
060     * @return passphrase of the private key file
061     */
062    public String getPassphrase()
063    {
064        return passphrase;
065    }
066
067    /**
068     * Set the passphrase of the private key file.
069     *
070     * @param passphrase passphrase of the private key file
071     */
072    public void setPassphrase( final String passphrase )
073    {
074        this.passphrase = passphrase;
075    }
076
077    /**
078     * Get the absolute path to the private key file.
079     *
080     * @return absolute path to private key
081     */
082    public String getPrivateKey()
083    {
084        return privateKey;
085    }
086
087    /**
088     * Set the absolute path to private key file.
089     *
090     * @param privateKey path to private key in local file system
091     */
092    public void setPrivateKey( final String privateKey )
093    {
094        this.privateKey = privateKey;
095    }
096
097    /**
098     * Get the user's password which is used when connecting to the repository.
099     *
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}