{"id":25955281,"url":"https://github.com/andrzejszelag/oauth2githubssl","last_synced_at":"2026-05-16T11:01:50.821Z","repository":{"id":280293161,"uuid":"941536346","full_name":"AndrzejSzelag/oauth2githubssl","owner":"AndrzejSzelag","description":"A Spring Boot web application configured to use OAuth 2.0 with GitHub API and self-signed SSL certificate.","archived":false,"fork":false,"pushed_at":"2025-12-14T16:05:01.000Z","size":302,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-17T01:23:05.694Z","etag":null,"topics":["github-api","gradle","oauth2","spirng-boot","spring-security","ssl-certificates","thymeleaf","tomcat10","visual-studio-code"],"latest_commit_sha":null,"homepage":"https://github.com/AndrzejSzelag/oauth2githubssl","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AndrzejSzelag.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"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":"2025-03-02T14:28:27.000Z","updated_at":"2025-12-14T16:05:05.000Z","dependencies_parsed_at":"2025-04-21T11:45:09.810Z","dependency_job_id":null,"html_url":"https://github.com/AndrzejSzelag/oauth2githubssl","commit_stats":null,"previous_names":["andrzejszelag/oauth2githubssl"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AndrzejSzelag/oauth2githubssl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrzejSzelag%2Foauth2githubssl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrzejSzelag%2Foauth2githubssl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrzejSzelag%2Foauth2githubssl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrzejSzelag%2Foauth2githubssl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndrzejSzelag","download_url":"https://codeload.github.com/AndrzejSzelag/oauth2githubssl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrzejSzelag%2Foauth2githubssl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33100319,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["github-api","gradle","oauth2","spirng-boot","spring-security","ssl-certificates","thymeleaf","tomcat10","visual-studio-code"],"created_at":"2025-03-04T16:18:23.005Z","updated_at":"2026-05-16T11:01:50.816Z","avatar_url":"https://github.com/AndrzejSzelag.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OAuth 2.0 GitHub SSL \n\n[![SSL](https://img.shields.io/badge/SSL-self--signed-red.svg?logo=openssl)](https://en.wikipedia.org/wiki/Self-signed_certificate)\n[![GitHub API](https://img.shields.io/badge/GitHub-API-181717.svg?logo=github)](https://docs.github.com/en/rest)\n[\u003cimg alt=\"OAuth 2.0\" src=\"https://img.shields.io/badge/OAuth-2.0-2C2255.svg?logo=oauth\"\u003e](https://oauth.net/2/)\n[\u003cimg alt=\"springboot\" src=\"https://img.shields.io/badge/Spring Boot-3.4.3-COLOR.svg?logo=springboot\"\u003e](\u003chttps://spring.io/projects/spring-boot\u003e) \n[\u003cimg alt=\"Gradle\" src=\"https://img.shields.io/badge/Gradle-8.12.1-02303A.svg?logo=gradle\"\u003e](https://gradle.org/)\n[\u003cimg alt=\"Thymeleaf\" src=\"https://img.shields.io/badge/Thymeleaf-3.1.1-005F0F.svg?logo=thymeleaf\"\u003e](https://www.thymeleaf.org/)\n[\u003cimg alt=\"SonarQube\" src=\"https://img.shields.io/badge/SonarQube-4.0.0.2929-4E9BCD.svg?logo=sonarqube\"\u003e](https://www.sonarsource.com/products/sonarqube/)\n\n### A Spring Boot web application configured to use OAuth 2.0 with GitHub API and self-signed SSL certificate.\n\n![OAuth2GitHub1.java](OAuth2GitHub1.png \"OAuth2Github - Login\")\n![OAuth2GitHub2.java](OAuth2GitHub2.png \"OAuth2GitHub - Home\")\n\n### Tech Stack\n* 🔶 Java 21.0.5 LTS\n* 🔶 Spring Boot 3.4.3\n* 🔶 Gradle 8.12.1\n* 🔶 Apache Tomcat 10.1.36\n* 🔶 SonarQube 4.0.0.2929\n\n### IDE\n* 🔶 Visual Studio Code 1.98.2\n\n\n#### What is OAuth 2.0?\n\nOAuth (Open Authorization) 2.0 is an open authorization standard. It provides a way for users to log into a web-based\napplication (Spring Security OAuth 2.0) by delegating the authentication process to trusted third-party services, such\nas Google and GitHub. The full specification of the OAuth 2.0 protocol can be found\nin [RFC 6749](https://datatracker.ietf.org/doc/html/rfc6749).\n\n#### How use OAuth2.0?\n\n1. Clone a GitHub Repository to your computer:\n\n          git clone https://github.com/AndrzejSzelag/oauth2githubssl.git\n\n2. Configuring an **OAuth 2.0 GitHub SSL** application in **GitHub** (https://github.com/: Settings -\u003e Developer settings).\n\n   You need:\n\n        CLIENT_ID\n        CLIENT_SECRET\n\n      **Warning:**\n      These values should be set in the **application.yml** file in place of **CLIENT_ID** and **CLIENT_SECRET**.\n\n###  Self-Signed SSL Configuration (Required for HTTPS)\n\nThis application uses a self-signed SSL certificate for development and testing purposes with HTTPS. Since the private key file (`keystore.p12`) is excluded from the repository (via `.gitignore` for security reasons), you must generate your own local key before running the application.\n\n### 1. Generate the Keystore File\n\nExecute the following command in the project's root directory. This requires **Java Development Kit (JDK)** to be installed, as it uses the `keytool` utility. \n\n```bash\nkeytool -genkeypair -alias oauth2githubssl-key -keyalg RSA -keysize 2048 -storetype PKCS12 -keystore src/main/resources/keystore.p12 -validity 3650\n```\n\n* **Crucial Step**: When prompted for **\"First and last name\"** (**What is your first and last name?**), you must enter **localhost**. This is required for the browser to trust the certificate for local development.\n\n* **Password**: Use a secure password (e.g., ```haslo1234```) and remember it for the next step.\n\n### 2. Configure the Application Properties\nAfter generating the ```keystore.p12``` file, ensure your **src/main/resources/application.properties** file contains the following configuration, making sure to replace the placeholder password with the one you chose during generation:\n\n      server.port=8443\n      server.ssl.enabled=true\n      server.ssl.key-store-type=PKCS12\n      server.ssl.key-store=classpath:keystore.p12\n      server.ssl.key-store-password=haslo1234\n      server.ssl.key-alias=oauth2githubssl-key\n\n\n### To run a Spring Boot project using Gradle from the command line, follow these steps:\n* Open a terminal in the project's root directory.\n* Execute the command:\n\n          gradle bootRun\n          \n* Paste the URL into your web browser:\n\n          http://localhost:8080\n\n\n❤️ You have successfully run the Spring Boot project using Gradle!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrzejszelag%2Foauth2githubssl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrzejszelag%2Foauth2githubssl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrzejszelag%2Foauth2githubssl/lists"}