Does this endpoint support this type?

        I consider C{/server} endpoints to implicitly support C{/signon}.
969127
def supportsType(self, type_uri):
        
        return (
            (type_uri in self.type_uris) or 
            (type_uri == OPENID_2_0_TYPE and self.isOPIdentifier())
            )
45813
function Client(endpointUrl, sourceId) {
		this.restClient = new restClient.Client();

		this.endpointUrl = endpointUrl;

		if (this.endpointUrl) {
			// Remove the trailing slash if necessary
			if (this.endpointUrl.indexOf('/', this.endpointUrl.length - 1) !== -1) {
				this.endpointUrl = this.endpointUrl.substr(0, this.endpointUrl.length - 2);
			}

			// Add the default version if not present
			// TODO: The client should take care of the version in a better way
			if (this.endpointUrl.indexOf('/v1', this.endpointUrl.length - 3) === -1) {
				this.endpointUrl = this.endpointUrl + '/v1';
			}
		}

		if (sourceId !== undefined) {
			this.sourceId = sourceId;
		}
	}
275211
function checkBasicSupport(client, metadata, properties) {
  try {
    const supported = client.issuer.token_endpoint_auth_methods_supported;
    if (!supported.includes(properties.token_endpoint_auth_method)) {
      if (supported.includes('client_secret_post')) {
        properties.token_endpoint_auth_method = 'client_secret_post';
      }
    }
  } catch (err) {}
}
810938
private void validateEndpoint(String endpoint) {
        try {
            new URL(endpoint);
        } catch (MalformedURLException e) {
            throw new InvalidParameterException(Messages.i18n.format("OrganizationResourceImpl.InvalidEndpointURL")); //$NON-NLS-1$
        }
    }
1113567
function badRequestEndpoint(path, query, body) {
  return function () {
    body = body || getJSON(path);
    createEndpointFromObject(path, query, body).status(400);
    console.log('  registered error path %s', path);
  }
}
880691
private boolean isTypeValid(char type) {
		return (type == MAPPED_ADDRESS || type == RESPONSE_ADDRESS
				|| type == SOURCE_ADDRESS || type == CHANGED_ADDRESS
				|| type == REFLECTED_FROM || type == XOR_MAPPED_ADDRESS
				|| type == ALTERNATE_SERVER || type == XOR_PEER_ADDRESS
				|| type == XOR_RELAYED_ADDRESS || type == DESTINATION_ADDRESS);
	}
779396
function chRoute(client, serverType, msg, cb) {
    const servers = client._station.serversMap[serverType];
    if (!servers || !servers.length) {
        utils.invokeCallback(cb, new Error(`rpc servers not exist with serverType: ${serverType}`));
        return;
    }
    let con;
    if (!client.chParam) {
        client.chParam = {};
    }
    if (client.chParam[serverType]) {
        con = client.chParam[serverType].consistentHash;
    } else {
        client.opts.station = client._station;
        con = new ConsistentHash(servers, client.opts);
    }
    const hashFieldIndex = client.opts.hashFieldIndex;
    const field = msg.args[hashFieldIndex] || JSON.stringify(msg);
    utils.invokeCallback(cb, null, con.getNode(field));
    client.chParam[serverType] = { consistentHash: con };
}
1331340
def detectType(option, urlOrPaths, serverEndpoint=ServerEndpoint, verbose=Verbose, tikaServerJar=TikaServerJar, 
               responseMimeType='text/plain',
               services={'type': '/detect/stream'}):
    '''
    
    '''
    paths = getPaths(urlOrPaths)
    return [detectType1(option, path, serverEndpoint, verbose, tikaServerJar, responseMimeType, services)
             for path in paths]
1156341
def endpoint(value: Any) -> Any:
    
    if issubclass(type(value), Endpoint):
        return value
    elif isinstance(value, str):
        for api, cls in MANAGED_API.items():
            if value.startswith(api + " "):
                return cls.from_inline(value)
        return UnknownEndpoint.from_inline(value)
    else:
        raise TypeError("Cannot convert {0} to endpoint".format(value))
5167
def _supported_rule(protocol, ethertype):
        """"""
        if not protocol or protocol not in utils.SUPPORTED_SG_PROTOCOLS:
            return False

        if ethertype != n_const.IPv4:
            return False

        return True
306150
def validate_endpoint_create_and_update_params(endpoint_type, managed, params):
    
    # options only allowed for GCS endpoints
    if endpoint_type != "server":
        # catch params with two option flags
        if params["public"] is False:
            raise click.UsageError(
                "Option --private only allowed " "for Globus Connect Server endpoints"
            )
        # catch any params only usable with GCS
        for option in [
            "public",
            "myproxy_dn",
            "myproxy_server",
            "oauth_server",
            "location",
            "network_use",
            "max_concurrency",
            "preferred_concurrency",
            "max_parallelism",
            "preferred_parallelism",
        ]:
            if params[option] is not None:
                raise click.UsageError(
                    (
                        "Option --{} can only be used with Globus Connect Server "
                        "endpoints".format(option.replace("_", "-"))
                    )
                )

    # if the endpoint was not previously managed, and is not being passed
    # a subscription id, it cannot use managed endpoint only fields
    if (not managed) and not (params["subscription_id"] or params["managed"]):
        for option in [
            "network_use",
            "max_concurrency",
            "preferred_concurrency",
            "max_parallelism",
            "preferred_parallelism",
        ]:
            if params[option] is not None:
                raise click.UsageError(
                    (
                        "Option --{} can only be used with managed "
                        "endpoints".format(option.replace("_", "-"))
                    )
                )

    # because the Transfer service doesn't do network use level updates in a
    # patchy way, *both* endpoint `POST`s *and* `PUT`s must either use
    # - `network_use='custom'` with *every* other parameter specified (which
    #   is validated by the service), or
    # - a preset/absent `network_use` with *no* other parameter specified
    #   (which is *not* validated by the service; in this case, Transfer will
    #   accept but ignore the others parameters if given, leading to user
    #   confusion if we don't do this validation check)
    custom_network_use_params = (
        "max_concurrency",
        "preferred_concurrency",
        "max_parallelism",
        "preferred_parallelism",
    )
    if params["network_use"] != "custom":
        for option in custom_network_use_params:
            if params[option] is not None:
                raise click.UsageError(
                    "The {} options require you use --network-use=custom.".format(
                        "/".join(
                            "--" + option.replace("_", "-")
                            for option in custom_network_use_params
                        )
                    )
                )

    # make sure --(no-)managed and --subscription-id are mutually exclusive
    # if --managed given pass DEFAULT as the subscription_id
    # if --no-managed given, pass None
    managed_flag = params.get("managed")
    if managed_flag is not None:
        params.pop("managed")
        if managed_flag:
            params["subscription_id"] = params.get("subscription_id") or "DEFAULT"
        else:
            if params.get("subscription_id"):
                raise click.UsageError(
                    "Cannot specify --subscription-id and "
                    "use the --no-managed option."
                )
            params["subscription_id"] = EXPLICIT_NULL

    # make sure --no-default-directory are mutually exclusive
    # if --no-managed given, pass an EXPLICIT_NULL as the default directory
    if params.get("no_default_directory"):

        if params.get("default_directory"):
            raise click.UsageError(
                "--no-default-directory and --default-directory are mutually "
                "exclusive."
            )
        else:
            params["default_directory"] = EXPLICIT_NULL
            params.pop("no_default_directory")
18938
def endpoint_type(self, endpoint_type):
        
        if endpoint_type is not None and len(endpoint_type) > 64:
            raise ValueError("Invalid value for `endpoint_type`, length must be less than or equal to `64`")

        self._endpoint_type = endpoint_type
95073
function SignerProvider(path, options) {
  if (!(this instanceof SignerProvider)) { throw new Error('[ethjs-provider-signer] the SignerProvider instance requires the "new" flag in order to function normally (e.g. `const eth = new Eth(new SignerProvider(...));`).'); }
  if (typeof options !== 'object') { throw new Error(`[ethjs-provider-signer] the SignerProvider requires an options object be provided with the 'privateKey' property specified, you provided type ${typeof options}.`); }
  if (typeof options.signTransaction !== 'function') { throw new Error(`[ethjs-provider-signer] the SignerProvider requires an options object be provided with the 'signTransaction' property specified, you provided type ${typeof options.privateKey} (e.g. 'const eth = new Eth(new SignerProvider("http://ropsten.infura.io", { privateKey: (account, cb) => cb(null, 'some private key') }));').`); }

  const self = this;
  self.options = Object.assign({
    provider: HTTPProvider,
  }, options);
  self.timeout = options.timeout || 0;
  self.provider = new self.options.provider(path, self.timeout); // eslint-disable-line
  self.rpc = new EthRPC(self.provider);
}
757041
function validateAddrs (msg, streamHandler, type, cb) {
    try {
      msg.dstPeer.addrs.forEach((addr) => {
        return multiaddr(addr)
      })
    } catch (err) {
      writeResponse(streamHandler, type === proto.CircuitRelay.Type.HOP
        ? proto.CircuitRelay.Status.HOP_DST_MULTIADDR_INVALID
        : proto.CircuitRelay.Status.STOP_DST_MULTIADDR_INVALID)
      return cb(err)
    }

    try {
      msg.srcPeer.addrs.forEach((addr) => {
        return multiaddr(addr)
      })
    } catch (err) {
      writeResponse(streamHandler, type === proto.CircuitRelay.Type.HOP
        ? proto.CircuitRelay.Status.HOP_SRC_MULTIADDR_INVALID
        : proto.CircuitRelay.Status.STOP_SRC_MULTIADDR_INVALID)
      return cb(err)
    }

    return cb(null)
  }
415774
def from_inline(cls: Type[ESUserEndpointType], inline: str) -> ESUserEndpointType:
        
        m = ESUserEndpoint.re_inline.match(inline)
        if m is None:
            raise MalformedDocumentError(ESUserEndpoint.API)
        server = m.group(1)
        port = int(m.group(2))
        return cls(server, port)
350461
function hasCustomEndpoint(client) {
  //if set endpoint is set for specific client, enable endpoint discovery will raise an error.
  if (client._originalConfig && client._originalConfig.endpoint && client._originalConfig.endpointDiscoveryEnabled === true) {
    throw util.error(new Error(), {
      code: 'ConfigurationException',
      message: 'Custom endpoint is supplied; endpointDiscoveryEnabled must not be true.'
    });
  };
  var svcConfig = AWS.config[client.serviceIdentifier] || {};
  return Boolean(AWS.config.endpoint || svcConfig.endpoint || (client._originalConfig && client._originalConfig.endpoint));
}
946381
function RegisterEndpoint(method, path, _desc, _callback) {
    if(!_.isString(path)) {
      throw new Error("Invalid path for " + path + " (" + method + ")");
    }
    var desc = (typeof _desc === 'string' ? _desc : null),
      callback = (typeof _desc === 'function' ? _desc : (typeof _callback === 'function' ? _callback : null));
    var name = method + ":" + path.replace(/\//g, '.');
    if(name.charAt(0) === '.') name = name.substr(1);
    if(typeof this.__endpoints[name] !== 'undefined') {
      throw new Error("Previously registered endpoint " + path + " in namespace "+ this.__namespace + "(" + method + ")");
    }
    ENDPOINT_COUNTER++;
    var endpointChain = new RouteChain(name, path, method, SERVER);
    endpointChain.__namespace = this.__namespace;
    if(desc) endpointChain['desc'] = desc;
    if(callback) endpointChain.then(callback);
    this.__endpoints[name] = endpointChain;
    /* We allow route chaining of utility functions. After a route endpoint has been created,
     * we can attach additional data / utility functions to it. */
    return endpointChain;
  }