Ejemplo n.º 1
0
  public PasswordAuthentication requestPasswordAuthentication(
      InetAddress var1, int var2, String var3, String var4, String var5) {
    PasswordAuthentication var12;
    if (this.authenticator != null) {
      Authenticator var6 = this.authenticator;
      var12 = var6.requestPasswordAuthentication(var1, var2, var3, var4, var5);
    } else {
      var12 = null;
    }

    return var12;
  }
Ejemplo n.º 2
0
  public static Session getDefaultInstance(Properties var0, Authenticator var1) {
    if (defaultSession == null) {
      defaultSession = new Session(var0, var1);
    } else if (defaultSession.authenticator != var1) {
      if (defaultSession.authenticator != null && var1 != null) {
        ClassLoader var2 = defaultSession.authenticator.getClass().getClassLoader();
        ClassLoader var3 = var1.getClass().getClassLoader();
        if (var2 == var3) {
          return defaultSession;
        }
      }

      throw new SecurityException("Access denied");
    }

    return defaultSession;
  }
Ejemplo n.º 3
0
  private Session(Properties var1, Authenticator var2) {
    HashMap var3 = new HashMap();
    this.authTable = var3;
    ArrayList var4 = new ArrayList();
    this.providers = var4;
    HashMap var5 = new HashMap();
    this.providersByProtocol = var5;
    HashMap var6 = new HashMap();
    this.providersByClassName = var6;
    Properties var7 = new Properties();
    this.addressMap = var7;
    Logger var8 = Logger.getLogger(Session.class.getName());
    this.logger = var8;
    this.props = var1;
    this.authenticator = var2;
    String var9 = var1.getProperty("mail.debug");
    boolean var10 = (new Boolean(var9)).booleanValue();
    this.debug = var10;
    Logger var11 = this.logger;
    Level var12;
    if (this.debug) {
      var12 = Level.FINER;
    } else {
      var12 = Level.SEVERE;
    }

    var11.setLevel(var12);
    this.logger.info("using GNU JavaMail 1.3");
    ClassLoader var13;
    if (var2 == null) {
      var13 = this.getClass().getClassLoader();
    } else {
      var13 = var2.getClass().getClassLoader();
    }

    InputStream var14 = this.getResourceAsStream(var13, "META-INF/javamail.default.providers");
    this.loadProviders(var14, "default");
    InputStream var15 = this.getResourceAsStream(var13, "META-INF/javamail.providers");
    this.loadProviders(var15, "custom");

    try {
      String var16 = SYSTEM_PROVIDERS;
      File var17 = new File(var16);
      FileInputStream var18 = new FileInputStream(var17);
      BufferedInputStream var19 = new BufferedInputStream(var18);
      this.loadProviders(var19, "system");
    } catch (FileNotFoundException var43) {
      Logger var37 = this.logger;
      Level var38 = Level.WARNING;
      var37.log(var38, "no system providers", var43);
    }

    Logger var20 = this.logger;
    Level var21 = Level.FINE;
    StringBuilder var22 = (new StringBuilder()).append("Providers by class name: ");
    String var23 = this.providersByClassName.toString();
    String var24 = var22.append(var23).toString();
    var20.log(var21, var24);
    Logger var25 = this.logger;
    Level var26 = Level.FINE;
    StringBuilder var27 = (new StringBuilder()).append("Providers by protocol: ");
    String var28 = this.providersByProtocol.toString();
    String var29 = var27.append(var28).toString();
    var25.log(var26, var29);
    InputStream var30 = this.getResourceAsStream(var13, "META-INF/javamail.default.address.map");
    this.loadAddressMap(var30, "default");
    InputStream var31 = this.getResourceAsStream(var13, "META-INF/javamail.address.map");
    this.loadAddressMap(var31, "custom");

    try {
      String var32 = SYSTEM_ADDRESS_MAP;
      File var33 = new File(var32);
      FileInputStream var34 = new FileInputStream(var33);
      BufferedInputStream var35 = new BufferedInputStream(var34);
      this.loadAddressMap(var35, "system");
    } catch (FileNotFoundException var42) {
      Logger var40 = this.logger;
      Level var41 = Level.WARNING;
      var40.log(var41, "no system address map", var42);
    }
  }