Package org.ietf.jgss

Examples of org.ietf.jgss.GSSCredential


    init();
    try {
      String proxyloc = null;
      MyProxy myproxy = new MyProxy(myproxyHostname, myproxyPortNumber);
      int lifeHours = myproxyLifeTime * SECS_PER_HOUR;
      GSSCredential proxy = myproxy.get(myproxyUserName, myproxyPassword, lifeHours);

      GlobusCredential globusCred = null;
      if (proxy instanceof GlobusGSSCredentialImpl) {
        globusCred = ((GlobusGSSCredentialImpl) proxy).getGlobusCredential();
        String uid = myproxyUserName;
View Full Code Here


    return myproxy.get(this.myproxyUserName, this.myproxyPassword,
        this.myproxyLifeTime);
  }

  private static GSSCredential getDefaultProxy(String portalUsername) {
    GSSCredential proxy = ProxyManager.getDefaultProxy(portalUsername);
    if (proxy != null) {
      try {
        System.out.println("Found proxy [" + proxy.getName()
            + "] for user [" + portalUsername + "]");
      } catch (GSSException e) {
        e.printStackTrace();
      }
    } else {
View Full Code Here

    try {
      init();
      String proxyloc = null;
      MyProxy myproxy = new MyProxy(myproxyHostname, myproxyPortNumber);
      int lifeHours = myproxyLifeTime * SECS_PER_HOUR;
      GSSCredential proxy = myproxy.get(myproxyUserName, myproxyPassword,
          lifeHours);

      GlobusCredential globusCred = null;
      if (proxy instanceof GlobusGSSCredentialImpl) {
        globusCred = ((GlobusGSSCredentialImpl) proxy)
View Full Code Here

          this.setContext(context);
          checkStatus = true;
            }else{
              UserInfo userInfo =  (UserInfo) facesContext.getExternalContext().getSessionMap().get("userInfo");
              String userName = userInfo.getUserName();
               GSSCredential credential = ProxyManager.getDefaultProxy(userName);
          if(credential != null){
            context = new ApplicationGlobalContext();
            context.setGssCredential(credential);
            context.load();
            facesContext.getExternalContext().getSessionMap().put("applicationGlobalContext", context);
View Full Code Here

          try {
            init() ;
              String proxyloc = null;
              MyProxy myproxy = new MyProxy(hostname, port);
              GSSCredential proxy = myproxy.get(username, password, lifetime);
              GlobusCredential globusCred = null;
              if (proxy instanceof GlobusGSSCredentialImpl) {
                  globusCred = ((GlobusGSSCredentialImpl) proxy).getGlobusCredential();
                  log.info("got proxy from myproxy for " + username + " with " + lifetime + " lifetime.");
                  String uid=username;
View Full Code Here

    public static GSSCredential createCredentials() throws GfacException {
        try {
            // load the x509 proxy. if not found, quit.
            String proxyPath = System.getProperty("X509_USER_PROXY");
            GlobusCredential globusCred;
            GSSCredential gssCred;

            // if delegated proxy is used, then the proxy path is denoted by the
            // env variable X509_USER_PROXY
            if (proxyPath != null && !"".equals(proxyPath)) {
                globusCred = new GlobusCredential(proxyPath);
View Full Code Here

                throw new GfacException(
                        "To make Secure WSIF client Global configuration must nor be Null",FaultCode.InvaliedConfig);
            }
           
            String trustedCertFile = context.getCredentials().getTrustedCertsFile();
            GSSCredential credential = context.getGssCredential();
           
           
            SoapHttpDynamicInfosetInvoker invoker;
            if(credential != null){
                if(context.getCredentials().getTrustedCertsFile() != null){
View Full Code Here

  public ExpBldrWorkflow getWorkflowFromRegistry(String workflowTemplateName, ApplicationGlobalContext context){
   
    Workflow xBayaWorkflow = null;
    ExpBldrWorkflow expBldrWorkflow = new ExpBldrWorkflow();
    GSSCredential cred = null;
        try {
      FileInputStream fis = new FileInputStream(context.getProperties().getProperty("ssl.hostcertsKeyFile"));
      GlobusCredential globusCred = new GlobusCredential(fis);
      cred = new GlobusGSSCredentialImpl(globusCred, GSSCredential.INITIATE_AND_ACCEPT);
    } catch (Exception e1) {
View Full Code Here

    init();
    try {
      String proxyloc = null;
      MyProxy myproxy = new MyProxy(myproxyHostname, myproxyPortNumber);
      int lifeHours = myproxyLifeTime * SECS_PER_HOUR;
      GSSCredential proxy = myproxy.get(myproxyUserName, myproxyPassword,
          lifeHours);

      GlobusCredential globusCred = null;
      if (proxy instanceof GlobusGSSCredentialImpl) {
        globusCred = ((GlobusGSSCredentialImpl) proxy)
View Full Code Here

                PrintWriter out = response.getWriter();
                  out.println("<h3>Login to My Proxy server using your credentials!</h3><br>");
                  out.close();
                throw new Exception("Login to My Proxy server using your credentials!");
              }
              GSSCredential gssCredential = ProxyManager.getDefaultProxy(username);
              context.setGssCredential(gssCredential);
            if(context.getXmcCatTestUser() == null ){
              context.setXmcCatTestUser(gssCredential.getName().toString());
          }
            context.setPortalUserName(username);
            System.out.println("Getting Grid credential form Proxy worked for " + username);
             // to  create RegistryService instance
              ValueBinding binding = application.createValueBinding("#{applicationGlobalContext}");
          binding.setValue(facesContext, context);
          this.setContext(context);
          checkStatus = true;
            }else{
              UserInfo userInfo =  (UserInfo) facesContext.getExternalContext().getSessionMap().get("userInfo");
              String userName = userInfo.getUserName();
               GSSCredential credential = ProxyManager.getDefaultProxy(userName);
          if(credential != null){
            context = new ApplicationGlobalContext();
            context.setGssCredential(credential);
            context.load();
            facesContext.getExternalContext().getSessionMap().put("applicationGlobalContext", context);
View Full Code Here

TOP

Related Classes of org.ietf.jgss.GSSCredential

Copyright © 2018 www.massapicom. 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.