| Home >> All >> org >> mitre >> [ cvw Javadoc ] |
Source code: org/mitre/cvw/CVWAuthenticator.java
1 /* 2 * Copyright (c) 1996-2000. The MITRE Corporation (http://www.mitre.org/). 3 * All rights reserved. 4 * CVW comes with ABSOLUTELY NO WARRANTY. See license for details. 5 */ 6 7 package org.mitre.cvw; 8 9 import java.net.Authenticator; 10 import java.net.PasswordAuthentication; 11 import java.net.InetAddress; 12 13 /** 14 * This class will handle Basic password authentication over the network when required. 15 * 16 * @version 1.0 17 * @author S.R.Jones 18 */ 19 public class CVWAuthenticator extends java.net.Authenticator { 20 21 private String username; 22 private char[] password; 23 24 public CVWAuthenticator (String username, char[] password) { 25 super(); 26 this.username = username; 27 this.password = password; 28 } 29 30 protected PasswordAuthentication getPasswordAuthentication() { 31 return new PasswordAuthentication(username, password); 32 } 33 34 }