Examples of IIdentity


Examples of com.subgraph.vega.api.model.identity.IIdentity

    if (workspace != null) {     
      IIdentityModel identityModel = workspace.getIdentityModel();
      IdentityWizard wizard = new IdentityWizard();
      IdentityWizardDialog dialog = new IdentityWizardDialog(HandlerUtil.getActiveWorkbenchWindow(event).getShell(), wizard);
      if (dialog.open() == IDialogConstants.OK_ID) {
        IIdentity identity = wizard.getIdentity();
        identityModel.store(identity);
      }
    }
    return null;
  }
View Full Code Here

Examples of com.subgraph.vega.api.model.identity.IIdentity

    final IRequestOriginScanner requestOrigin = workspace.getRequestLog().getRequestOriginScanner(scanInstance);
    final IHttpRequestEngine requestEngine = factory.createRequestEngine(IHttpRequestEngine.EngineConfigType.CONFIG_SCANNER, requestEngineConfig, requestOrigin);
    HttpProtocolParams.setUserAgent(requestEngine.getHttpClient().getParams(), config.getUserAgent());
    requestEngine.setCookieStore(cookieStore);
    // REVISIT: consider moving authentication method to request engine config
    IIdentity identity = config.getScanIdentity();
    if (identity != null && identity.getAuthMethod() != null) {
      identity.getAuthMethod().setAuth(requestEngine);
    }

    return requestEngine;
  }
View Full Code Here

Examples of com.subgraph.vega.api.model.identity.IIdentity

    }
  }
 
  // temporary: in the future this will be managed with session handling rules
  private boolean handleMacroAuthentication() {
    IIdentity identity = scan.getConfig().getScanIdentity();
    if (identity != null) {
      IAuthMethod authMethod = identity.getAuthMethod();
      if (authMethod != null && authMethod.getType() == IAuthMethod.AuthMethodType.AUTH_METHOD_HTTP_MACRO) {
        logger.info("Pre-authenticating using an HTTP macro");
        IAuthMethodHttpMacro authMethodMacro = (IAuthMethodHttpMacro)authMethod;
        IHttpMacroContext context = scan.getRequestEngine().createMacroContext();
        context.setDict(identity.getDict());
        IHttpMacroExecutor executor = scan.getRequestEngine().createMacroExecutor(authMethodMacro.getMacro(), context);
        while (executor.hasNext()) {
          IHttpResponse response;
          int status;
         
View Full Code Here

Examples of com.subgraph.vega.api.model.identity.IIdentity

   
    final IRequestOriginScanner requestOrigin = workspace.getRequestLog().getRequestOriginScanner(scanInstance);
    IHttpRequestEngine requestEngine = requestEngineFactory.createRequestEngine(IHttpRequestEngine.EngineConfigType.CONFIG_SCANNER, requestEngineConfig, requestOrigin);
    HttpProtocolParams.setUserAgent(requestEngine.getHttpClient().getParams(), config.getUserAgent());
    // REVISIT: consider moving authentication method to request engine config
    IIdentity identity = config.getScanIdentity();
    if (identity != null && identity.getAuthMethod() != null) {
      identity.getAuthMethod().setAuth(requestEngine);
    }
   
    if (config.getCookieList() != null && !config.getCookieList().isEmpty()) {
      CookieStore cookieStore = requestEngine.getCookieStore();
      for (Cookie c: config.getCookieList()) {
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.