Examples of AuthenticationDialog


Examples of org.jets3t.gui.AuthenticationDialog

        }

        try {
            if (scope.getScheme().equals("ntlm")) {
                //if (authscheme instanceof NTLMScheme) {
                AuthenticationDialog pwDialog = new AuthenticationDialog(
                    ownerFrame, "Authentication Required",
                    "<html>Host <b>" + scope.getHost() + ":" + scope.getPort() +
                    "</b> requires Windows authentication</html>", true);
                pwDialog.setVisible(true);
                if (pwDialog.getUser().length() > 0) {
                    credentials = new NTCredentials(
                            pwDialog.getUser(),
                            pwDialog.getPassword(),
                            scope.getHost(),
                            pwDialog.getDomain());
                }
                pwDialog.dispose();
            } else if (scope.getScheme().equals("basic")
                    || scope.getScheme().equals("digest")) {
                //if (authscheme instanceof RFC2617Scheme) {
                AuthenticationDialog pwDialog = new AuthenticationDialog(ownerFrame,
                        "Authentication Required",
                        "<html><center>Host <b>"
                                + scope.getHost()
                                + ":"
                                + scope.getPort()
                                + "</b>"
                                + " requires authentication for the realm:<br><b>"
                                + scope.getRealm() + "</b></center></html>",
                        false);
                pwDialog.setVisible(true);
                if (pwDialog.getUser().length() > 0) {
                    credentials = new UsernamePasswordCredentials(pwDialog.getUser(), pwDialog.getPassword());
                }
                pwDialog.dispose();
            } else {
                throw new IllegalArgumentException("Unsupported authentication scheme: "
                        + scope.getScheme());
            }
            if (credentials != null){
View Full Code Here

Examples of org.jets3t.gui.AuthenticationDialog

            return credentials;
        }
        try {
            if (scope.getScheme().equals("ntlm")) {
                //if (authscheme instanceof NTLMScheme) {
                AuthenticationDialog pwDialog = new AuthenticationDialog(ownerFrame,
                        "Authentication Required",
                        "<html>Host <b>" + scope.getHost() + ":"
                                + scope.getPort()
                                + "</b> requires Windows authentication</html>",
                        true);
                pwDialog.setVisible(true);
                if (pwDialog.getUser().length() > 0) {
                    credentials = new NTCredentials(
                            pwDialog.getUser(),
                            pwDialog.getPassword(),
                            scope.getHost(),
                            pwDialog.getDomain());
                }
                pwDialog.dispose();
            } else if (scope.getScheme().equals("basic")
                    || scope.getScheme().equals("digest")) {
                //if (authscheme instanceof RFC2617Scheme) {
                AuthenticationDialog pwDialog = new AuthenticationDialog(ownerFrame,
                        "Authentication Required",
                        "<html><center>Host <b>"
                                + scope.getHost()
                                + ":"
                                + scope.getPort()
                                + "</b>"
                                + " requires authentication for the realm:<br><b>"
                                + scope.getRealm() + "</b></center></html>",
                        false);
                pwDialog.setVisible(true);
                if (pwDialog.getUser().length() > 0) {
                    credentials = new UsernamePasswordCredentials(pwDialog.getUser(),
                            pwDialog.getPassword());
                }
                pwDialog.dispose();
            } else {
                throw new IllegalArgumentException("Unsupported authentication scheme: "
                        + scope.getScheme());
            }
            if (credentials != null){
View Full Code Here

Examples of org.jets3t.gui.AuthenticationDialog

        if (credentials!=null){
            return credentials;
        }
        try {
            if (scope.getScheme().equals("ntlm")) {
                AuthenticationDialog pwDialog = new AuthenticationDialog(
                    ownerFrame, "Authentication Required",
                    "<html>Host <b>" + scope.getHost() + ":" + scope.getPort()
                    + "</b> requires Windows authentication</html>", true);
                pwDialog.setVisible(true);
                if (pwDialog.getUser().length() > 0) {
                    credentials = new NTCredentials(
                            pwDialog.getUser(),
                            pwDialog.getPassword(),
                            scope.getHost(),
                            pwDialog.getDomain());
                }
                pwDialog.dispose();
            } else if (scope.getScheme().equals("basic")
                    || scope.getScheme().equals("digest")) {
                //authscheme instanceof RFC2617Scheme
                AuthenticationDialog pwDialog = new AuthenticationDialog(
                    ownerFrame, "Authentication Required",
                    "<html><center>Host <b>" + scope.getHost() + ":" + scope.getPort() + "</b>"
                    + " requires authentication for the realm:<br><b>" + scope.getRealm()
                    + "</b></center></html>", false);
                pwDialog.setVisible(true);
                if (pwDialog.getUser().length() > 0) {
                    credentials = new UsernamePasswordCredentials(pwDialog.getUser(), pwDialog.getPassword());
                }
                pwDialog.dispose();
            } else {
                throw new InvalidCredentialsException(
                        "Unsupported authentication scheme: " + scope.getScheme());
            }
            if (credentials != null){
View Full Code Here

Examples of remote.service.authentication.client.AuthenticationDialog

  private void authenticate() {
//    if (authenticationDialog == null) {
      String server = this.session.getServerConnection().getConnectionInfo().getServerName();
      String session = this.session.getSessionId();
      authenticationDialog = new AuthenticationDialog(this, server,session, this.getSettings(),this);
      authenticationDialog.setLocationRelativeTo(this);
      authenticationDialog.toFront();
      authenticationDialog.setModal(true);
      authenticationDialog.setVisible(true);
    //}
View Full Code Here

Examples of rex.graphics.AuthenticationDialog

   private boolean init() throws RexXMLAExecuteException{

      try {
       Authenticator.setDefault (new Authenticator (){
           protected PasswordAuthentication getPasswordAuthentication() {
           AuthenticationDialog ad = new AuthenticationDialog(null, endpoint.toString());
           return new PasswordAuthentication (ad.getUsername()
                                               , ad.getPasswordCA());
           }
         });
         urlConnection = (HttpURLConnection) endpoint.openConnection();
         urlConnection.setRequestMethod("POST");
         urlConnection.setDoInput(true);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.