{"id":21762144,"url":"https://github.com/daniilty/sharenote-auth","last_synced_at":"2025-10-29T00:47:28.919Z","repository":{"id":57652264,"uuid":"443797763","full_name":"daniilty/sharenote-auth","owner":"daniilty","description":"service for jwt authorization/user registration","archived":false,"fork":false,"pushed_at":"2022-01-21T13:41:23.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-26T01:20:28.544Z","etag":null,"topics":["go","golang","jwt","jwt-authentication","rs256"],"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/daniilty.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}},"created_at":"2022-01-02T15:18:03.000Z","updated_at":"2022-01-06T11:06:09.000Z","dependencies_parsed_at":"2022-08-28T00:02:14.238Z","dependency_job_id":null,"html_url":"https://github.com/daniilty/sharenote-auth","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniilty%2Fsharenote-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniilty%2Fsharenote-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniilty%2Fsharenote-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniilty%2Fsharenote-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daniilty","download_url":"https://codeload.github.com/daniilty/sharenote-auth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244739944,"owners_count":20501990,"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","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":["go","golang","jwt","jwt-authentication","rs256"],"created_at":"2024-11-26T12:11:11.231Z","updated_at":"2025-10-29T00:47:23.874Z","avatar_url":"https://github.com/daniilty.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Service for jwt authorization\n\n## How to generate OpenSSL RSA Key Pair:\n```bash\n$ openssl genrsa -des3 -out private.pem 2048\n$ openssl rsa -in private.pem -outform PEM -pubout -out public.pem\n$ openssl rsa -in private.pem -out private_unencrypted.pem -outform PEM\n```\n\n## All avaliable endpoints:\n\n* GET `/api/v1/auth/jwks` - get generated JSON Web Key Set to use it for token validation with proxy(krakend for example)\n* GET `/api/v1/auth/me` - get current user info(\"Authorization: Bearer ...\" header is required)\n* POST `/api/v1/auth/login` - login user. Body:\n```\n{\n  \"email\": \"sample@sample.com\",\n  \"password\": \"sample\"\n}\n```\n* POST `/api/v1/auth/register` - register user. Body:\n```\n{\n  \"email\": \"sample@sample.com\",\n  \"password\": \"sample\",\n  \"name\": \"Biggus Dickus\",\n  \"userName\": \"sample\"\n}\n```\n\n## Environment variables:\n\n* `PUBKEY` - `export PUBKEY=\"$(cat public.pem)\"`\n* `PRIVKEY` - `export PUBKEY=\"$(cat private_unencrypted.pem)\"`\n* `USERS_GRPC_ADDR` - grpc address of sharenote-users service\n* `HTTP_SERVER_ADDR` - http address of this service\n* `TOKEN_EXPIRY` - authorization token expiry(in seconds)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaniilty%2Fsharenote-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaniilty%2Fsharenote-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaniilty%2Fsharenote-auth/lists"}