Examples of TrustType


Examples of org.openxri.resolve.TrustType

        //
        try
        {
            String sXRI = "xri://@gates*com";
            XRD oDesc =
                oResolver.resolveAuthToXRD(new XRI(sXRI), new TrustType(), false);
            assertTrue("Thought " + sXRI + " did not exist.", oDesc == null);
        }
        catch (PartialResolutionException e) {
          // ok
        }
        catch (Exception E)
        {
            E.printStackTrace();
            assertTrue("Unexpected " + E, false);
        }

        //
        // resolve existing xri
        //
        try
        {
            String sXRI = "xri://@foo";
            XRD oDesc =
                oResolver.resolveAuthToXRD(new XRI(sXRI), new TrustType(), false);
            assertTrue("Thought " + sXRI + " exists.", oDesc != null);
            assertTrue("Invalid XRD Query", oDesc.getQuery().equals("*foo"));
        }
        catch (Exception E)
        {
            E.printStackTrace();
            assertTrue("Unexpected " + E, false);
        }

        //
        // resolve nonexistent segment
        //
        try
        {
            String sXRI = "xri://@foo*bar";
            XRD oDesc =
                oResolver.resolveAuthToXRD(new XRI(sXRI), new TrustType(), false);
            assertTrue("Expected PartialResolutionException but not thrown", false);
        }
        catch (PartialResolutionException e) {
          // ok
        }
View Full Code Here

Examples of org.openxri.resolve.TrustType

        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

Examples of org.openxri.resolve.TrustType

      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

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

Examples of org.openxri.resolve.TrustType

      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

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

Examples of org.openxri.resolve.TrustType

      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

Examples of org.openxri.resolve.TrustType

      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

Examples of org.openxri.resolve.TrustType

    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

Examples of org.openxri.resolve.TrustType

        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
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.