Package org.openxri.resolve

Examples of org.openxri.resolve.TrustType


      return;
    }


    // defaults if resolution media type is null
    TrustType trustType = new TrustType();
    boolean refs = true;
    boolean sep = true;
    boolean https = false;
    boolean saml = false;
    boolean cid = true;
    boolean uric = false;
    boolean nodefault_t = false;
    boolean nodefault_p = false;
    boolean nodefault_m = false;
    boolean debug = false;

    String tempStr = null;
    if(resMediaType != null) {
      tempStr = resMediaType.getParam(MimeType.PARAM_REFS);
      if(tempStr != null && tempStr.equals("false"))
        refs = false;

      tempStr = resMediaType.getParam(MimeType.PARAM_SEP);
      if(tempStr != null && tempStr.equals("false"))
        sep = false;

      tempStr = resMediaType.getParam(MimeType.PARAM_TRUST);
      if (tempStr != null) {
        try {
          trustType.setType(tempStr);
        }
        catch (IllegalTrustTypeException e) {
          sendResponse(response, HTTP_ERROR_CONTENT_TYPE, "INVALID_RESOLUTION_MEDAIA_TYPE(code=212): " + resMediaType, null);
          return;
        }
       
        https = trustType.isHTTPS();
        saml = trustType.isSAML();
      }

      tempStr = resMediaType.getParam(MimeType.PARAM_HTTPS);
      if(tempStr != null && tempStr.equals("true"))
        https = true;

      tempStr = resMediaType.getParam(MimeType.PARAM_SAML);
      if(tempStr != null && tempStr.equals("true"))
        saml = true;

      // override the trusttype
      trustType.setParameterPair(https, saml);
     
      tempStr = resMediaType.getParam(MimeType.PARAM_URIC);
      if(tempStr != null && tempStr.equals("true"))
        uric = true;
View Full Code Here


      this.httpsURI = buffer.toString();
    }

    String trust = this.properties.getProperty(PROPERTIES_KEY_TRUST, DEFAULT_TRUST);
    this.trust = new TrustType(trust);

    String checkChildren = this.properties.getProperty(PROPERTIES_KEY_CHECK_CHILDREN, DEFAULT_CHECK_CHILDREN);
    this.checkChildren = Boolean.parseBoolean(checkChildren);

    this.uriMapper = (URIMapper) this.serverConfig.getComponentRegistry().getComponent(URIMapper.class);
View Full Code Here

      sendError(request, response, qxri, 211, "INVALID_QXRI(code=211): "+oEx.getMessage(), oEx);
      return;
    }

    // defaults if resolution media type is null
    TrustType trustType = new TrustType();
    boolean refs = true;
    boolean sep = true;
    boolean https = false;
    boolean saml = false;
    boolean cid = true;
    boolean uric = false;
    boolean nodefault_t = false;
    boolean nodefault_p = false;
    boolean nodefault_m = false;
    boolean debug = false;

    String tempStr = null;
    if(resMediaType != null) {
      tempStr = resMediaType.getParam(MimeType.PARAM_REFS);
      if(tempStr != null && tempStr.equals("false"))
        refs = false;

      tempStr = resMediaType.getParam(MimeType.PARAM_SEP);
      if(tempStr != null && tempStr.equals("false"))
        sep = false;

      tempStr = resMediaType.getParam(MimeType.PARAM_TRUST);
      if (tempStr != null) {
        try {
          trustType.setType(tempStr);
        }
        catch (IllegalTrustTypeException e) {
          sendError(request, response, qxri, 212, "INVALID_RESOLUTION_MEDAIA_TYPE(code=212): " + resMediaType, e);
          return;
        }

        https = trustType.isHTTPS();
        saml = trustType.isSAML();
      }

      tempStr = resMediaType.getParam(MimeType.PARAM_HTTPS);
      if(tempStr != null && tempStr.equals("true"))
        https = true;

      tempStr = resMediaType.getParam(MimeType.PARAM_SAML);
      if(tempStr != null && tempStr.equals("true"))
        saml = true;

      // override the trusttype
      trustType.setParameterPair(https, saml);

      tempStr = resMediaType.getParam(MimeType.PARAM_URIC);
      if(tempStr != null && tempStr.equals("true"))
        uric = true;
View Full Code Here

    private void tracert(
        StringBuffer sOutput, Resolver resolver) throws XRIResolutionException
    {
       
        // TODO: trusted resolution is currently not supported
        TrustType trustType = new TrustType(TrustType.TRUST_NONE);
        boolean followRefs = true;
       
        // note: See also Resolver.resolve
        // resolver.setLookaheadMode(true);
        XRDS xrds = resolver.resolveAuthToXRDS(msTargetXRI, trustType, followRefs);
View Full Code Here

        String server;
        String identifier = request.getRequestURI().substring(request.getContextPath().length() + 1);
         
        XRD xrd = resolver.resolveSEPToXRD(
            sPath,
            new TrustType(TrustType.TRUST_NONE),
            AuthenticationService.SERVICE_TYPE1,
            null,
            true);

        if (xrd == null || xrd.getSelectedServices().getList().size() == 0) {
View Full Code Here

      return;
    }


    // defaults if resolution media type is null
    TrustType trustType = new TrustType();
    boolean refs = true;
    boolean sep = true;

    String tempStr = null;
    if(resMediaType != null) {
      tempStr = resMediaType.getParam(MimeType.PARAM_REFS);
      if(tempStr != null && tempStr.equals("false"))
        refs = false;

      tempStr = resMediaType.getParam(MimeType.PARAM_SEP);
      if(tempStr != null && tempStr.equals("false"))
        sep = false;

      tempStr = resMediaType.getParam(MimeType.PARAM_TRUST);
      if (tempStr != null) {
        try {
          trustType.setType(tempStr);
        }
        catch (IllegalTrustTypeException e) {
          sendResponse(response, HTTP_ERROR_CONTENT_TYPE, "INVALID_RESOLUTION_MEDAIA_TYPE(code=212): " + resMediaType, null);
          return;
        }
View Full Code Here

    try {

      this.list = Arrays.asList(new Service[] {
          new Service(),
          new DefaultService(new URI("http://__mydefaultendpoint__")),
          new AuthorityResolutionService(new URI("http://__myauthorityresolver__"), "__myproviderid__", new TrustType(TrustType.TRUST_NONE), SEPUri.APPEND_NONE),
          new ProxyResolutionService(new URI[] { new URI("http://__myproxyserver__"), new URI("https://__mysecureproxyserver__") }, "__myproviderid__", new TrustType(TrustType.TRUST_NONE), Boolean.TRUE, Boolean.TRUE),
          new AuthenticationService(new URI[] { new URI("http://__myauthenticationprovider__"), new URI("https://__mysecureauthenticationprovider__") }, "__myproviderid__", null, true),
          new ContactService(new URI("http://__mycontactprovider__"), "__myproviderid__", false),
          new ForwardingService(new URI("http://__myforwardingprovider__"), "__myproviderid__", false, true),
          new XDIService(new URI("http://__myxdiendpoint__"), "__myproviderid__")
      });
View Full Code Here

      this.httpsURI = buffer.toString();
    }

    String trust = this.properties.getProperty(PROPERTIES_KEY_TRUST, DEFAULT_TRUST);
    this.trust = new TrustType(trust);

    String checkChildren = this.properties.getProperty(PROPERTIES_KEY_CHECK_CHILDREN, DEFAULT_CHECK_CHILDREN);
    this.checkChildren = Boolean.parseBoolean(checkChildren);

    this.uriMapper = (URIMapper) ServerConfigFactory.getSingleton().getComponentRegistry().getComponent(URIMapper.class);
View Full Code Here

        String server;
        String identifier = request.getRequestURI().substring(request.getContextPath().length() + 1);
         
        XRD xrd = resolver.resolveSEPToXRD(
            sPath,
            new TrustType(TrustType.TRUST_NONE),
            AuthenticationService.SERVICE_TYPE1,
            null,
            true);

        if (xrd == null || xrd.getSelectedServices().getList().size() == 0) {
View Full Code Here

      return;
    }


    // defaults if resolution media type is null
    TrustType trustType = new TrustType();
    boolean refs = true;
    boolean sep = true;

    String tempStr = null;
    if(resMediaType != null) {
      tempStr = resMediaType.getParam(MimeType.PARAM_REFS);
      if(tempStr != null && tempStr.equals("false"))
        refs = false;

      tempStr = resMediaType.getParam(MimeType.PARAM_SEP);
      if(tempStr != null && tempStr.equals("false"))
        sep = false;

      tempStr = resMediaType.getParam(MimeType.PARAM_TRUST);
      if (tempStr != null) {
        try {
          trustType.setType(tempStr);
        }
        catch (IllegalTrustTypeException e) {
          sendResponse(response, HTTP_ERROR_CONTENT_TYPE, "INVALID_RESOLUTION_MEDAIA_TYPE(code=212): " + resMediaType, null);
          return;
        }
View Full Code Here

TOP

Related Classes of org.openxri.resolve.TrustType

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.