Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class SimpleAuthenticator extends Authenticator {
- private String user;
- private String password;
- public SimpleAuthenticator() {
- }
- public SimpleAuthenticator(String user, String password) {
- this.password = password;
- this.user = user;
- }
- public String getPassword() {
- return password;
- }
- public void setPassword(String password) {
- this.password = password;
- }
- public String getUser() {
- return user;
- }
- public void setUser(String user) {
- this.user = user;
- }
- protected PasswordAuthentication getPasswordAuthentication() {
- return new PasswordAuthentication(user, password);
- }
- }
Add Comment
Please, Sign In to add comment