1 22 package javax.security.auth.message.callback; 23 24 import javax.security.auth.callback.Callback ; 25 26 28 35 public class PasswordValidationCallback implements Callback 36 { 37 private String username; 38 private char[] password; 39 40 private boolean resultOfAuthentication = false; 41 42 48 public PasswordValidationCallback(String username, char[] password) 49 { 50 this.username = username; 51 this.password = password; 52 } 53 54 57 public void clearPassword() 58 { 59 this.password = null; 60 } 61 62 70 public char[] getPassword() 71 { 72 return this.password; 73 } 74 75 79 public boolean getResult() 80 { 81 return this.resultOfAuthentication; 82 } 83 84 88 public String getUsername() 89 { 90 return this.username; 91 } 92 93 98 public void setResult(boolean result) 99 { 100 this.resultOfAuthentication = result; 101 } 102 } 103 | Popular Tags |