All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.qa.automation.android.util.email.CustomizedAuthenticator Maven / Gradle / Ivy

The newest version!
package com.qa.automation.android.util.email;

import javax.mail.Authenticator;
import javax.mail.PasswordAuthentication;

/**
 * Customized Authenticator
 *
 * @author andrewleo
 */
public class CustomizedAuthenticator extends Authenticator {
    /**
     * The User name.
     */
    String userName = null;
    /**
     * The Password.
     */
    String password = null;

    /**
     * Instantiates a new Customized authenticator.
     */
    public CustomizedAuthenticator() {
    }

    /**
     * Instantiates a new Customized authenticator.
     *
     * @param username the username
     * @param password the password
     */
    public CustomizedAuthenticator(String username, String password) {
        this.userName = username;
        this.password = password;
    }

    protected PasswordAuthentication getPasswordAuthentication() {
        return new PasswordAuthentication(userName, password);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy