001/**
002 * Copyright 2010-2013 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.kuali.common.util;
017
018import org.slf4j.Logger;
019import org.slf4j.LoggerFactory;
020
021import com.jcraft.jsch.UserInfo;
022
023public class DefaultUserInfo implements UserInfo {
024        private static final Logger logger = LoggerFactory.getLogger(DefaultUserInfo.class);
025
026        String passphrase;
027        String password;
028
029        @Override
030        public boolean promptPassword(String message) {
031                return false;
032        }
033
034        @Override
035        public boolean promptPassphrase(String message) {
036                return false;
037        }
038
039        @Override
040        public boolean promptYesNo(String message) {
041                return false;
042        }
043
044        @Override
045        public void showMessage(String message) {
046                logger.info(message);
047        }
048
049        @Override
050        public String getPassphrase() {
051                return passphrase;
052        }
053
054        public void setPassphrase(String passphrase) {
055                this.passphrase = passphrase;
056        }
057
058        @Override
059        public String getPassword() {
060                return password;
061        }
062
063        public void setPassword(String password) {
064                this.password = password;
065        }
066
067}