{"id":15616227,"url":"https://github.com/aamirmousavi/logoinig","last_synced_at":"2025-07-22T00:31:58.519Z","repository":{"id":144485955,"uuid":"492058525","full_name":"aamirmousavi/logoinig","owner":"aamirmousavi","description":"logoing is a simple example for login and generate secure token with jwt and gin packages and postgres as our database","archived":false,"fork":false,"pushed_at":"2022-05-13T23:07:07.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-29T15:13:43.328Z","etag":null,"topics":["go","golang","jwt","jwt-authentication","jwt-token","login","login-system","security"],"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/aamirmousavi.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}},"created_at":"2022-05-13T22:43:58.000Z","updated_at":"2022-05-13T23:08:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"e65824da-f4df-4624-9311-e0006a1d5acb","html_url":"https://github.com/aamirmousavi/logoinig","commit_stats":{"total_commits":2,"total_committers":1,"mean_commits":2.0,"dds":0.0,"last_synced_commit":"83ea5bf16bac0f8e2326aa50a47e940466585b78"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aamirmousavi/logoinig","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aamirmousavi%2Flogoinig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aamirmousavi%2Flogoinig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aamirmousavi%2Flogoinig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aamirmousavi%2Flogoinig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aamirmousavi","download_url":"https://codeload.github.com/aamirmousavi/logoinig/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aamirmousavi%2Flogoinig/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266404941,"owners_count":23923491,"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-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["go","golang","jwt","jwt-authentication","jwt-token","login","login-system","security"],"created_at":"2024-10-03T07:04:54.024Z","updated_at":"2025-07-22T00:31:58.488Z","avatar_url":"https://github.com/aamirmousavi.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Logoing\nlogoing is a simple example for login and generate secure token with jwt and gin packages and postgres as our database.\nin this project we are not using token with cookies it's just a simple example you can develop it yourself.\nnote: don't recive your toekn in query parameters of your users request.\n\n\n# Contents\n- [Install](#install)\n- [Requirements](#requirements)\n- [Testing](#testing)\n\n# Install\n\n```\ngit clone github.com/aamirmousavi/logoinig\n```\n```\ncd logoinig\n```\nand run the app\n```\ngo run cmd/main.go\n```\nalso you can build and run the build\n\n# Requirements\n\nInstall and run posgres \nyou can change postgres dataSourceName in internal/services/database/postgredb/pgresdb.go line 18\n\nalso you need to create a table with user as name and\n```\nid          int\nusername    text\npassword    text\nfirstname   text\nlastname    text\n```\nas our columns\nand insert one or more rows to your table\n# Testing\nI created a user with 'aamirmousavi' as username and '85856969A' as password\nwe send the request\n```\ncurl --location --request POST 'localhost:8080/login' \\\n--form 'username=\"aamirmousavi\"' \\\n--form 'password=\"85856969A\"'\n```\nout:\n```\ntoken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVc2VybmFtZSI6ImFhbWlybW91c2F2aSIsImV4cCI6MTY1MjQ4MzMwMH0.oE5qtBNzoOHOdG8NrjUbjQ4_I8dMuM9AGBHQbRD3jJs\n```\nnow we check our token\n```\ncurl --location --request GET 'localhost:8080/admin?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVc2VybmFtZSI6ImFhbWlybW91c2F2aSIsImV4cCI6MTY1MjQ4MzMwMH0.oE5qtBNzoOHOdG8NrjUbjQ4_I8dMuM9AGBHQbRD3jJs'\n```\nout:\n```\nhello aamirmousavi.\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faamirmousavi%2Flogoinig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faamirmousavi%2Flogoinig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faamirmousavi%2Flogoinig/lists"}