【源码简介】
tr069项目openacs最新源码
【源码截图】
public class ACSServlet extends HttpServlet {
protected static final String ATTR_LASTINFORM = "lastInform";
private static final String ATTR_CONFIGURATOR = "cfgrun";
private class MyAuthenticator extends Authenticator {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
String ui = this.getRequestingURL().getUserInfo();
System.out.println("MyAuthenticator: ui=" ui);
if (ui == null || ui.equals("")) {
return super.getPasswordAuthentication();
}
String up[] = ui.split(":");
char[] pc = new char[up[1].length()];
up[1].getChars(0, up[1].length(), pc, 0);
PasswordAuthentication pa = new PasswordAuthentication(up[0], pc);
return pa;
}
}




