{"id":35269337,"url":"https://github.com/factset/enterprise-sdk-utils-java","last_synced_at":"2026-04-02T02:10:10.345Z","repository":{"id":37821414,"uuid":"431487845","full_name":"factset/enterprise-sdk-utils-java","owner":"factset","description":"Utilities that support FactSet's SDK in Java","archived":false,"fork":false,"pushed_at":"2026-02-03T11:47:40.000Z","size":251,"stargazers_count":1,"open_issues_count":6,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-02-04T01:11:19.082Z","etag":null,"topics":["api","factset","sdk"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/factset.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-11-24T13:05:50.000Z","updated_at":"2026-02-03T11:46:44.000Z","dependencies_parsed_at":"2024-05-17T12:27:21.771Z","dependency_job_id":"e6b4d37b-a276-46fe-9653-6778b478bcf4","html_url":"https://github.com/factset/enterprise-sdk-utils-java","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/factset/enterprise-sdk-utils-java","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/factset%2Fenterprise-sdk-utils-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/factset%2Fenterprise-sdk-utils-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/factset%2Fenterprise-sdk-utils-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/factset%2Fenterprise-sdk-utils-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/factset","download_url":"https://codeload.github.com/factset/enterprise-sdk-utils-java/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/factset%2Fenterprise-sdk-utils-java/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31294416,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T01:43:37.129Z","status":"online","status_checked_at":"2026-04-02T02:00:08.535Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","factset","sdk"],"created_at":"2025-12-30T11:53:21.657Z","updated_at":"2026-04-02T02:10:10.331Z","avatar_url":"https://github.com/factset.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg alt=\"FactSet\" src=\"https://www.factset.com/hubfs/Assets/images/factset-logo.svg\" height=\"56\" width=\"290\"\u003e\n\n# FactSet SDK Utilities for Java\n\n[![Maven Central](https://img.shields.io/maven-central/v/com.factset.sdk/utils)](https://search.maven.org/artifact/com.factset.sdk/utils)\n\n[![Apache-2 license](https://img.shields.io/badge/license-Apache2-brightgreen.svg)](https://www.apache.org/licenses/LICENSE-2.0)\n\nThis repository contains a collection of utilities that supports FactSet's SDK in Java and facilitate usage of FactSet APIs.\n\n## Installation\n\n### Maven\n\nAdd the below dependency to the project's POM:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.factset.sdk\u003c/groupId\u003e\n    \u003cartifactId\u003eutils\u003c/artifactId\u003e\n    \u003cversion\u003e1.1.5\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Gradle\n\nAdd these dependencies to your project's build file:\n\n```groovy\nrepositories {\n    mavenCentral()\n}\n\ndependencies {\n    implementation \"com.factset.sdk:utils:1.1.5\"\n}\n```\n\n### Snapshot Releases\n\nTo be able to install snapshot releases of the sdk an additional repository must be added to the maven or gradle config.\n\n#### Maven Snapshot Repository\n\n```xml\n\u003crepositories\u003e\n    \u003crepository\u003e\n        \u003cid\u003esonatype\u003c/id\u003e\n        \u003cname\u003esonatype-snapshot\u003c/name\u003e\n        \u003curl\u003ehttps://central.sonatype.com/repository/maven-snapshots/\u003c/url\u003e\n        \u003csnapshots\u003e\n            \u003cenabled\u003etrue\u003c/enabled\u003e\n        \u003c/snapshots\u003e\n        \u003creleases\u003e\n            \u003cenabled\u003efalse\u003c/enabled\u003e\n        \u003c/releases\u003e\n    \u003c/repository\u003e\n\u003c/repositories\u003e\n```\n\n#### Gradle Snapshot Repository\n\n```groovy\nrepositories {\n    mavenCentral()\n    maven {\n        url = uri(\"https://central.sonatype.com/repository/maven-snapshots/\")\n        mavenContent {\n            snapshotsOnly()\n        }\n    }\n}\n```\n\nSnapshot releases are cached by gradle for some time, for details see: [Gradle Dynamic Versions](https://docs.gradle.org/current/userguide/dynamic_versions.html#sub:declaring_dependency_with_changing_version)\n\n\n## Usage\n\nThis library contains multiple modules, sample usage of each module is below.\n\n### Authentication\n\nFirst, you need to create the OAuth 2.0 client configuration that will be used to authenticate against FactSet's APIs:\n\n1. [Create a new application](https://developer.factset.com/learn/authentication-oauth2#creating-an-application) on FactSet's Developer Portal.\n2. When prompted, download the configuration file and move it to your development environment.\n\n```java\npackage com.factset.sdk.console;\n\nimport java.io.BufferedReader;\nimport java.io.InputStream;\nimport java.io.InputStreamReader;\nimport java.net.URL;\nimport java.net.HttpURLConnection;\n\nimport com.factset.sdk.utils.authentication.ConfidentialClient;\n\npublic class Console {\n\n    public static void main(String[] args) {\n        HttpURLConnection connection = null;\n        try {\n            // The ConfidentialClient instance should be reused in production environments.\n            ConfidentialClient confidentialClient = new ConfidentialClient(\"./path/to/config.json\");\n\n            String token = confidentialClient.getAccessToken();\n            String bearerHeader = \"Bearer \" + token;\n\n            URL url = new URL(\"https://api.factset.com/analytics/lookups/v3/currencies\");\n\n            connection = (HttpURLConnection) url.openConnection();\n\n            connection.setRequestMethod(\"GET\");\n            connection.setRequestProperty(\"Authorization\", bearerHeader);\n            connection.setRequestProperty(\"Content-Type\", \"application/json\");\n\n            InputStream is = connection.getInputStream();\n            BufferedReader rd = new BufferedReader(new InputStreamReader(is));\n            StringBuilder response = new StringBuilder();\n            String line;\n            while ((line = rd.readLine()) != null) {\n                response.append(line);\n                response.append('\\r');\n            }\n            rd.close();\n\n            System.out.println(token);\n            System.out.println(response);\n        } catch (Exception e) {\n            e.printStackTrace();\n        } finally {\n            if (connection != null) {\n                connection.disconnect();\n            }\n        }\n    }\n}\n```\n\n### Configure a Proxy\n\nThe Confidential Client accepts an additional optional parameter called `RequestOptions`. This can be created to specify a proxy for the client to use. Below is an example of how to do this:\n\n```java\nProxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(\"127.0.0.1\", 8080));\nRequestOptions requestOptions = RequestOptions.builder().proxy(proxy).build();\n\n// Pass this into client\nConfidentialClient confidentialClient = new ConfidentialClient(\"./path/to/config.json\", requestOptions);\n```\n\n### Custom SSL Certificate\n\nIf you are making requests to a server which is using custom TLS certificates, you are able to verify the validity of the certificate via the `RequestOptions` configuration.\n\n#### Hostname Verifier\n\nYou can pass in a custom hostname verifier to modify the details of the verification with a custom implementation. Otherwise, the `RequestOptions` will use the default one which checks the hostname in the certificate, located in the JRE keystore, and compares it to the hostname of the URL that is being hit by the client.\n\n#### SSL Socket Factory\n\nYou can pass in a custom SSL Socket Factory and modify the `SSLContext` for a specific user use case. Otherwise, the `RequestOptions` uses a default `SSLSocketFactory` as described [here](https://docs.oracle.com/javase/7/docs/api/javax/net/ssl/HttpsURLConnection.html#getDefaultHostnameVerifier()).\n\n#### Example\n\n```java\nSSLContext sslContext = SSLContext.getInstance(\"TLS\");\nsslContext.init(...); // Configure this based on application's needs\n\nSSLSocketFactory sslSocketFactory = sslContext.getSocketFactory();\nHostnameVerifier hostnameVerifier = ((hostname, session) -\u003e ...); // Configure this based on application's needs\n\nRequestOptions reqOpt = RequestOptions.builder()\n        .hostnameVerifier(hostnameVerifier)\n        .sslSocketFactory(sslSocketFactory)\n        .build();\n```\n\n## Modules\n\nInformation about the various utility modules contained in this library can be found below.\n\n### Authentication\n\nThe [authentication module](src/main/java/com/factset/sdk/utils/authentication) provides helper classes that facilitate [OAuth 2.0](https://developer.factset.com/learn/authentication-oauth2) authentication and authorization with FactSet's APIs. Currently the module has support for the [client credentials flow](https://github.com/factset/oauth2-guidelines#client-credentials-flow-1).\n\nEach helper class in the module has the following features:\n\n* Accepts a `Configuration` instance that contains information about the OAuth 2.0 client, including the client ID and private key.\n* Performs authentication with FactSet's OAuth 2.0 authorization server and retrieves an access token.\n* Caches the access token for reuse and requests a new access token as needed when one expires.\n    * In order for this to work correctly, the helper class instance should be reused in production environments.\n\n#### Configuration\n\nClasses in the authentication module require OAuth 2.0 client configuration information to be passed to the constructor in the `ConfidentialClient` through a JSON-formatted file or a `Configuration` object. Below is an example of a JSON-formatted file:\n\n```json\n{\n    \"name\": \"Application name registered with FactSet's Developer Portal\",\n    \"clientId\": \"OAuth 2.0 Client ID registered with FactSet's Developer Portal\",\n    \"clientAuthType\": \"Confidential\",\n    \"owners\": [\"USERNAME-SERIAL\"],\n    \"jwk\": {\n        \"kty\": \"RSA\",\n        \"use\": \"sig\",\n        \"alg\": \"RS256\",\n        \"kid\": \"Key ID\",\n        \"d\": \"ECC Private Key\",\n        \"n\": \"Modulus\",\n        \"e\": \"Exponent\",\n        \"p\": \"First Prime Factor\",\n        \"q\": \"Second Prime Factor\",\n        \"dp\": \"First Factor CRT Exponent\",\n        \"dq\": \"Second Factor CRT Exponent\",\n        \"qi\": \"First CRT Coefficient\"\n    }\n}\n```\n\nThe other option is to pass in the `Configuration` instance which is initialised as shown below:\n\n```java\nimport com.factset.sdk.utils.authentication.Configuration;\nimport com.nimbusds.jose.jwk.RSAKey;\nimport org.json.JSONObject;\n\nJSONObject jsonObject = new JSONObject(\n  \"{ 'kty': 'RSA', 'use': 'sig', 'alg': 'RS256', 'kid': 'Key ID', 'd': 'ECC Private Key', 'n': 'Modulus', 'e': 'AQAB','p': 'First Prime Factor', 'q': 'Second Prime Factor', 'dp': 'First Factor CRT Exponent', 'dq': 'Second Factor CRT Exponent', 'qi': 'First CRT Coefficient' }\"\n);\n\nRSAKey jwk = RSAKey.parse(jsonObject.toString());\nConfiguration conf = new Configuration(\"client id\", \"Confidential\", jwk);\n```\n\nIf you're just starting out, you can visit FactSet's Developer Portal to [create a new application](https://developer.factset.com/applications) and download a configuration file in this format.\n\nIf you're creating and managing your signing key pair yourself, see the required [JWK parameters](https://github.com/factset/oauth2-guidelines#jwk-parameters) for public-private key pairs.\n\n# Contributing\n\nPlease refer to the [contributing guide](CONTRIBUTING.md).\n\n# Logging\n\nAll logger names start with \"com.factset\".\n\nThis library uses [SLF4J](https://www.slf4j.org/) as logging interface,\nwhich requires a [binding](https://www.slf4j.org/manual.html#swapping) to your logging framework on the classpath.\n\nIf no binding is found, SLF4J prints out the following warning and then defaults to a no-operation\nimplementation, which discard all logs:\n```\nSLF4J: Failed to load class \"org.slf4j.impl.StaticLoggerBinder\".\nSLF4J: Defaulting to no-operation (NOP) logger implementation\nSLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.\n```\n\n# Troubleshooting\n\n### \"Unsuccessful token response: Failed to authenticate or parse the token\"\n\nThis error occurs when the request for an OAuth 2.0 Access Token got a non-200 response\nthat could not be parsed as an [OAuth 2.0 Error Response](https://www.rfc-editor.org/rfc/rfc6749.html#section-5.2).\n\nAdditional logging can be enabled to troubleshoot the problem:\nThe logger `com.factset.sdk.utils.authentication.ConfidentialClient` logs out the exact response in log level `TRACE`.\n\n# Copyright\n\nCopyright 2025 FactSet Research Systems Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffactset%2Fenterprise-sdk-utils-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffactset%2Fenterprise-sdk-utils-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffactset%2Fenterprise-sdk-utils-java/lists"}