/* * [ReceiverAuthenticator.java] * * Summary: Provides Receiver userid/password as needed to the website. * * Copyright: (c) 2003-2017 Roedy Green, Canadian Mind Products, http://mindprod.com * * Licence: This software may be copied and used freely for any purpose but military. * http://mindprod.com/contact/nonmil.html * * Requires: JDK 1.8+ * * Created with: JetBrains IntelliJ IDEA IDE http://www.jetbrains.com/idea/ * * Version History: * 10.2 2009-04-03 tidy up code to check presence of necessary files to make it more WORA. */ package com.mindprod.replicator; import java.net.Authenticator; import java.net.PasswordAuthentication; /** * Provides Receiver userid/password as needed to the website. * * @author Roedy Green, Canadian Mind Products * @version 10.2 2009-04-03 tidy up code to check presence of necessary files to make it more WORA. * @since 2003-10-05 */ final class ReceiverAuthenticator extends Authenticator { /** * Called when password authorization is needed. Subclasses should override the default implementation, which * returns null. * * @return The PasswordAuthentication collected from the user, or null if none is provided. */ protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication( ConfigForReceiver.USERID, ConfigForReceiver.PASSWORD.toCharArray() ); } }