Ejemplo n.º 1
0
  /** Create the panel. */
  public SlcsPanel(String url) {

    if ((url == null) || "".equals(url)) {
      this.url = DEFAULT_URL;
    } else {
      this.url = url;
    }
    setLayout(
        new FormLayout(
            new ColumnSpec[] {
              FormSpecs.RELATED_GAP_COLSPEC,
              ColumnSpec.decode("default:grow"),
              FormSpecs.RELATED_GAP_COLSPEC,
            },
            new RowSpec[] {
              FormSpecs.RELATED_GAP_ROWSPEC,
              RowSpec.decode("default:grow"),
              FormSpecs.RELATED_GAP_ROWSPEC,
              FormSpecs.DEFAULT_ROWSPEC,
              FormSpecs.RELATED_GAP_ROWSPEC,
            }));
    add(getShibLoginPanel(), "2, 2, fill, fill");
    add(getLoginButton(), "2, 4, right, default");
    slcs = new SLCS(getShibLoginPanel());
    slcs.addSlcsListener(this);
    enablePanel(false);
    getShibLoginPanel().refreshIdpList();
  }
Ejemplo n.º 2
0
  public void slcsLoginComplete(X509Certificate cert, PrivateKey privateKey) {

    try {
      enablePanel(true);
      if (holder != null) {
        GSSCredential proxy = PlainProxy.init(slcs.getCertificate(), slcs.getPrivateKey(), 24 * 10);
        holder.proxyCreated(CredentialHelpers.unwrapGlobusCredential(proxy));
      }

    } catch (CredentialException e) {

      if (holder != null) {
        holder.proxyCreationFailed(e.getLocalizedMessage());
      }
      myLogger.error("SLCS login could not be completed.", e);
    }
  }
Ejemplo n.º 3
0
 public void addSlcsListener(SlcsListener l) {
   slcs.addSlcsListener(l);
 }