{"id":20103667,"url":"https://github.com/cvele/authentication-service","last_synced_at":"2026-01-18T19:36:29.389Z","repository":{"id":87380511,"uuid":"606710670","full_name":"cvele/authentication-service","owner":"cvele","description":"Simple GoLang authentication service with support for JWT tokens. Personal playground.","archived":false,"fork":false,"pushed_at":"2025-07-30T11:51:11.000Z","size":4475,"stargazers_count":1,"open_issues_count":7,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-30T14:16:34.526Z","etag":null,"topics":["auth-service","authentication-backend","jwt","rest","rest-api","user-authentication"],"latest_commit_sha":null,"homepage":"","language":"Go","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/cvele.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}},"created_at":"2023-02-26T10:33:00.000Z","updated_at":"2025-07-30T11:51:15.000Z","dependencies_parsed_at":"2024-04-19T13:48:55.000Z","dependency_job_id":"b5193b42-a85c-4e4d-b965-a869a48e5655","html_url":"https://github.com/cvele/authentication-service","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cvele/authentication-service","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cvele%2Fauthentication-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cvele%2Fauthentication-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cvele%2Fauthentication-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cvele%2Fauthentication-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cvele","download_url":"https://codeload.github.com/cvele/authentication-service/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cvele%2Fauthentication-service/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28549513,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T19:22:41.102Z","status":"ssl_error","status_checked_at":"2026-01-18T19:22:26.310Z","response_time":98,"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":["auth-service","authentication-backend","jwt","rest","rest-api","user-authentication"],"created_at":"2024-11-13T17:37:30.424Z","updated_at":"2026-01-18T19:36:29.384Z","avatar_url":"https://github.com/cvele.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Authentication Service\n\n@TRIGGER\nSimple authentication service with support for JWT tokens.\n\n## Overview\n\nAuth Service is a Golang application that provides a simple API for user authentication. \nIt uses JWT tokens to authenticate users and protect endpoints.\n\n\n## Table of Contents\n\n- [Usage](#usage)\n- [Configuration](#configuration)\n- [Endpoints](#endpoints)\n\n## Usage\n\nThe easiest way to get the service up and running is to use Docker. Run the following command from the root of the project:\n\n`docker-compose up`\n\n## Configuration\n\nThe following environment variables can be used to configure the application:\n\n| Name | Description | Default |\n| --- | --- | --- |\n| `DB_HOST` | Hostname for the database server | `localhost` |\n| `DB_PORT` | Port for the database server | `26257` |\n| `DB_NAME` | Name of the database | `auth` |\n| `DB_USER` | Username for the database | `root` |\n| `DB_PASSWORD` | Password for the database |  |\n| `DB_SSL_MODE` | SSL mode for the database connection | `disable` |\n| `JWT_SECRET_KEY` | Secret key for JWT tokens | `123` |\n| `TOKEN_TTL` | Time to live for JWT tokens | `30m` |\n| `PORT` | Port for the HTTP server | `8080` |\n| `MIGRATION_PATH` | Path to database migrations | `/app/migrations` |\n\n## Endpoints\n\n| Method | Path | Description |\n| --- | --- | --- |\n| `POST` | `/register` | Register a new user |\n| `POST` | `/login` | Login to the application |\n| `POST` | `/refresh` | Refresh a JWT token |\n| `POST` | `/validate` | Validate a JWT token |\n| `POST` | `/change-password` | Change the password for a user |\n\n`/register` - User registration\n\n```\ncurl --request POST \\\n  --url http://localhost:8080/register \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n\t\"username\": \"newuser\",\n\t\"password\": \"newpassword\"\n}'\n```\n\n`/login` - User login\n\nRequest:\n\n```\ncurl --request POST \\\n  --url http://localhost:8080/login \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n\t\"username\": \"newuser\",\n\t\"password\": \"newpassword\"\n}'\n```\n\n`/refresh` - Refresh access token\n\nRequest:\n\n```\ncurl --request POST \\\n  --url http://localhost:8080/refresh \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n\t\"refresh_token\": \"\u003ctoken\u003e\"\n}'\n```\n\n`/validate` - Validate JWT\n\nRequest:\n\n```\ncurl --request POST \\\n  --url http://localhost:8080/validate \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n\t\"token\": \"\u003ctoken\u003e\"\n}'\n```\n\n`/change-password` - Change password\n\nRequest:\n\n```\ncurl --request POST \\\n  --url http://localhost:8080/change-password \\\n  --header 'Content-Type: application/json' \\\n  --header 'Authorization: Bearer \u003ctoken\u003e' \\\n  --data '{\n\t\"old_password\": \"newpassword\",\n\t\"new_password\": \"newpassword2\"\n}'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcvele%2Fauthentication-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcvele%2Fauthentication-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcvele%2Fauthentication-service/lists"}