{"id":28158439,"url":"https://github.com/indeedeng/oauth-client","last_synced_at":"2025-08-07T20:16:19.019Z","repository":{"id":37891859,"uuid":"479125639","full_name":"indeedeng/oauth-client","owner":"indeedeng","description":"This is for developers that are building Indeed Applications and want to leverage Indeed OAuth in their process.","archived":true,"fork":false,"pushed_at":"2023-03-18T21:11:15.000Z","size":129,"stargazers_count":0,"open_issues_count":5,"forks_count":3,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-07-22T02:00:48.899Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/indeedeng.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-04-07T19:41:47.000Z","updated_at":"2025-07-18T17:44:56.000Z","dependencies_parsed_at":"2022-08-20T01:40:59.695Z","dependency_job_id":null,"html_url":"https://github.com/indeedeng/oauth-client","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/indeedeng/oauth-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indeedeng%2Foauth-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indeedeng%2Foauth-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indeedeng%2Foauth-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indeedeng%2Foauth-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/indeedeng","download_url":"https://codeload.github.com/indeedeng/oauth-client/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indeedeng%2Foauth-client/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269317249,"owners_count":24396847,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-07T02:00:09.698Z","response_time":73,"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":[],"created_at":"2025-05-15T09:19:34.429Z","updated_at":"2025-08-07T20:16:18.977Z","avatar_url":"https://github.com/indeedeng.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Authorization Client\n=============================\nThis is for developers that are building applications and want to leverage Indeed OAuth in their process.\n\nThe code are based on the Indeed authorization documentations (linked below):\nhttps://developer.indeed.com/docs/authorization/3-legged-oauth  \nhttps://developer.indeed.com/docs/authorization/2-legged-oauth\n\n\nHow to use\n=============================\n## Gradle\nnormal users: ``implementation 'com.indeed:oauth-client'``  \n\n## Configuration\n**NOTE 1:** Make sure you followed the Indeed [Authorization documentation](https://developer.indeed.com/docs/authorization/3-legged-oauth#get-a-client-id-and-secret) to get your application client id\n```java\n@Configuration\npublic class ApplicationConfig {\n    public static final String INDEED_SECURE_HOST_NAME = \"https://secure.indeed.com\";\n    @Bean\n    TwoLeggedOAuthClient twoLeggedOAuthClient() throws IOException, GeneralException {\n        return create2LeggedOAuth2Client(\n                clientId,\n                clientSecret,\n                INDEED_SECURE_HOST_NAME);\n    }\n    \n    @Bean\n    ThreeLeggedOAuthClient threeLeggedOAuthClient() throws IOException, GeneralException {\n        return create3LeggedOAuth2Client(\n                clientId,\n                clientSecret,\n                INDEED_SECURE_HOST_NAME);\n    }\n}\n```\n\n## Examples\n\n### Get *Request an Authorization Code Link*\n\n```java\npublic class Example {\n    @Autowired\n    ThreeLeggedOAuthClient threeLeggedOAuthClient;\n\n    URI get3LeggedOAuthCodeUrl(final String state) throws URISyntaxException {\n        return new ResponseEntity\u003c\u003e(\n                threeLeggedOAuthClient.getAuthorizeUrl(\n                        state,\n                        new String[]{EMAIL, OFFLINE_ACCESS, EMPLOYER_ACCESS},\n                        null,\n                        clientRedirectUrl),\n                HttpStatus.OK);\n    }\n}\n```\n\n### Request Access Token\n```java\npublic class Example {\n    @Autowired\n    ThreeLeggedOAuthClient threeLeggedOAuthClient;\n    @Autowired\n    TwoLeggedOAuthClient twoLeggedOAuthClient;\n\n    OIDCTokens get3LeggedAccessToken(final String code) throws IOException, URISyntaxException, ParseException {\n        return threeLeggedOAuthClient.getUserOAuthCredentials(code, clientRedirectUrl);\n    }\n\n    OIDCTokens get2LeggedAccessToken() throws IOException, ParseException {\n        return twoLeggedOAuthClient.getAppOAuthCredentials(new String[] {EMPLOYER_ACCESS});\n    }\n}\n```\n\n### Represent Employer (Get Employer Access Token)\n```java\npublic class Example {\n    @Autowired\n    ThreeLeggedOAuthClient threeLeggedOAuthClient;\n    @Autowired\n    TwoLeggedOAuthClient twoLeggedOAuthClient;\n\n    OIDCTokens get3LeggedEmployerToken(final String code, final String employerId) throws URISyntaxException, IOException, ParseException {\n        return threeLeggedOAuthClient.getEmployerOAuthCredentials(code, clientRedirectUrl, employerId);\n    }\n\n    OIDCTokens get2LeggedEmployerToken(final String employerId) throws IOException, ParseException {\n        return twoLeggedOAuthClient.getEmployerOAuthCredentials(employerId, new String[] {EMPLOYER_ACCESS});\n    }\n}\n```\n\n### Refresh Access Token\n```java\npublic class Example {\n    @Autowired\n    ThreeLeggedOAuthClient threeLeggedOAuthClient;\n\n    OIDCTokens refresh3LAccessToken(final String refreshToken) throws IOException, ParseException {\n        return threeLeggedOAuthClient.refreshOAuthCredentials(refreshToken);\n    }\n}\n```\n\nWhen to use\n=============================\n[Authorization Documentation](https://developer.indeed.com/docs/authorization/)\n\n## Authorization Code Flow (3-legged OAuth)\n\u003e Use this OAuth flow in applications that act on behalf of another user. Indeed displays an OAuth consent screen for users to login and give applications specific permissions.\n\n## Client Credentials Flow (2-legged OAuth)\n\u003e Use this OAuth flow in applications that act on behalf of the Indeed user that registered the app and the employer accounts associated with that Indeed user.\n\nGetting Help\n=============================\nIf an issue doesn’t already exist that describes the change you want to make, we recommend creating one and project maintainers will get back to you as soon as we can.\n\nContributing\n=============================\nRead the Code of Conduct and Contact the Maintainers before making any changes or a PR. If an issue doesn’t already exist that describes the change you want to make, we recommend creating one. If an issue does exist, please comment on it saying that you are starting to work on it, to avoid duplicating effort.\n\nProject Maintainers\n=============================\n[ahuangjm](https://github.com/ahuangJM)\n\nCode of Conduct\n=============================\nThis project is governed by the [Contributor Covenant v 1.4.1](https://www.contributor-covenant.org/)\nAny questions can be directed to [opensource@indeed.com]()\n\n\nLicense\n=============================\nAuthorization Client is licensed under the [Apache 2 license](./LICENSE).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Findeedeng%2Foauth-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Findeedeng%2Foauth-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Findeedeng%2Foauth-client/lists"}