{"id":22157494,"url":"https://github.com/yuriytkach/stream-39-demo-app-spring-security","last_synced_at":"2026-04-30T17:31:57.660Z","repository":{"id":187699765,"uuid":"650102827","full_name":"yuriytkach/stream-39-demo-app-spring-security","owner":"yuriytkach","description":"Demo application for online YouTube stream #39-40 about Spring Security","archived":false,"fork":false,"pushed_at":"2023-06-19T14:45:21.000Z","size":81,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-24T14:48:09.001Z","etag":null,"topics":["api-key","demo-app","java","jwt","spring-boot","springsecurity","youtube-stream"],"latest_commit_sha":null,"homepage":"","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/yuriytkach.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}},"created_at":"2023-06-06T10:46:07.000Z","updated_at":"2023-06-19T14:45:00.000Z","dependencies_parsed_at":"2023-08-11T20:27:26.648Z","dependency_job_id":null,"html_url":"https://github.com/yuriytkach/stream-39-demo-app-spring-security","commit_stats":null,"previous_names":["yuriytkach/stream-39-demo-app-spring-security"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/yuriytkach/stream-39-demo-app-spring-security","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuriytkach%2Fstream-39-demo-app-spring-security","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuriytkach%2Fstream-39-demo-app-spring-security/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuriytkach%2Fstream-39-demo-app-spring-security/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuriytkach%2Fstream-39-demo-app-spring-security/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yuriytkach","download_url":"https://codeload.github.com/yuriytkach/stream-39-demo-app-spring-security/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuriytkach%2Fstream-39-demo-app-spring-security/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32472396,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: 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":["api-key","demo-app","java","jwt","spring-boot","springsecurity","youtube-stream"],"created_at":"2024-12-02T03:09:29.695Z","updated_at":"2026-04-30T17:31:57.646Z","avatar_url":"https://github.com/yuriytkach.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Demo Project for Online Stream #39-40 - Spring Security\nDemo project for online YouTube stream #39 and #40 about Spring Security\n\n## Access to Online Stream on YouTube\n\nTo get a link to online stream on YouTube please do the following:\n\n- :moneybag: Make any donation to support my volunteering initiative to help Ukrainian Armed Forces by means described on [my website](https://www.yuriytkach.com/volunteer)\n- :email: Write me an [email](mailto:me@yuriytkach.com) indicating donation amount and time\n- :tv: I will reply with the link to the stream on YouTube.\n\nThank you in advance for your support! Слава Україні! :ukraine:\n\n# Run the app\n\nFirst, you need to start the Postgres database using provided `docker-compose.yml` file:\n\n```shell\ndocker-compose up\n```\n\nThen, you can start the application using Gradle:\n\n```shell\n./gradlew bootRun\n```\n\n# Test the app\n\nYou can test the app using provided `curl` commands:\n\nGet the list of supported currencies:\n\n```shell\ncurl http://localhost:8080/forex/currencies\n```\n\n## Simple API Key\n\nGet the exchange rate using general simple `x-api-key`:\n\n```shell\ncurl 'http://localhost:8080/forex?from=USD\u0026to=EUR' -H 'x-api-key: valid-key'\n```\n\n## Client API Key\n\nGet the exchange rate using client's key `x-client-api-key`:\n\n```shell\ncurl 'http://localhost:8080/forex?from=USD\u0026to=EUR' -H 'x-client-api-key: key1'\ncurl 'http://localhost:8080/forex?from=USD\u0026to=UAH' -H 'x-client-api-key: key3'\ncurl 'http://localhost:8080/forex?from=USD\u0026to=CHF' -H 'x-client-api-key: key4'\n```\n\n## JWT Authentication\n\nFirst, obtain the JWT token by supplying username and password in JSON format to the auth endpoint:\n\n```shell\ncurl -X POST http://localhost:8080/auth -H 'Content-Type: application/json' \\\n-d '{\"username\": \"user1\", \"password\": \"qwerty\"}'\n```\n\nThen use the received token to access the protected endpoint:\n\n```shell\ncurl 'http://localhost:8080/forex?from=USD\u0026to=EUR' -H 'Authorization: Bearer \u003cjwt token\u003e'\n```\n\nJWT token is valid for 2 minutes. This can be changed in `application.yml` file.\n\n### Reference Documentation\nFor further reference, please consider the following sections:\n\n* [Spring Security](https://docs.spring.io/spring-boot/docs/3.1.0/reference/htmlsingle/#web.security)\n* [Spring Data JPA](https://docs.spring.io/spring-boot/docs/3.1.0/reference/htmlsingle/#data.sql.jpa-and-spring-data)\n* [JWT.io](https://jwt.io/)\n\n### Guides\nThe following guides illustrate how to use some features concretely:\n\n* [Securing a Web Application](https://spring.io/guides/gs/securing-web/)\n* [Spring Boot and OAuth2](https://spring.io/guides/tutorials/spring-boot-oauth2/)\n* [Authenticating a User with LDAP](https://spring.io/guides/gs/authenticating-ldap/)\n* [Accessing Data with JPA](https://spring.io/guides/gs/accessing-data-jpa/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuriytkach%2Fstream-39-demo-app-spring-security","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyuriytkach%2Fstream-39-demo-app-spring-security","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuriytkach%2Fstream-39-demo-app-spring-security/lists"}