{"id":29196611,"url":"https://github.com/flancer32/teq-ant-auth","last_synced_at":"2025-07-02T06:07:50.086Z","repository":{"id":161027400,"uuid":"635802785","full_name":"flancer32/teq-ant-auth","owner":"flancer32","description":"Web Authentication plugin for TeqFW (the 'ant' generation).","archived":false,"fork":false,"pushed_at":"2024-04-19T10:14:28.000Z","size":216,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-21T13:53:01.505Z","etag":null,"topics":["authentication","generation-ant","tequila-fw"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flancer32.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2023-05-03T13:39:29.000Z","updated_at":"2024-04-25T07:27:13.909Z","dependencies_parsed_at":"2024-01-26T15:29:25.819Z","dependency_job_id":"52e81a9c-e6d5-4678-954a-49a8fbc28e2f","html_url":"https://github.com/flancer32/teq-ant-auth","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/flancer32/teq-ant-auth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flancer32%2Fteq-ant-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flancer32%2Fteq-ant-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flancer32%2Fteq-ant-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flancer32%2Fteq-ant-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flancer32","download_url":"https://codeload.github.com/flancer32/teq-ant-auth/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flancer32%2Fteq-ant-auth/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263083718,"owners_count":23411165,"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":["authentication","generation-ant","tequila-fw"],"created_at":"2025-07-02T06:07:46.404Z","updated_at":"2025-07-02T06:07:50.068Z","avatar_url":"https://github.com/flancer32.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @flancer32/teq-ant-auth\n\nCommon authentication of the users in Tequila Framework (the `ant` generation).\n\n## Disclaimer\n\nThis package is a part of the [Tequila Framework](https://flancer32.com/what-is-teqfw-f84ab4c66abf) (TeqFW). The TeqFW\nis currently in an early stage of development and should be considered unstable. It may change rapidly, leading to\nbreaking changes without prior notice. Use it at your own risk. Please note that contributions to the project are\nwelcome, but they should only be made by those who understand and accept the risks of working with an unstable\nframework.\n\n## Overview\n\n### Namespace\n\nThis plugin uses `Fl32_Auth` namespace.\n\n### Back\n\n#### DI Replacements\n\n* `Fl32_Auth_Back_Api_Mod_User`: the model provides application specific methods for the user.\n\n#### Web Handlers\n\n* `Fl32_Auth_Back_Web_Handler_Session_Front`: handles the HTTP session stored in the session cookies. It allows tracing\n  all requests from one browser, including anonymous users, to Web API endpoints. On the server side, the session IDs\n  are stored in the HTTP request objects.\n* `Fl32_Auth_Back_Web_Handler_Session_User`: handles the data for authenticated users. On the frontend, the session ID\n  is stored in the local storage. On the backend, the session ID is stored in the RDB (`fl32_auth_session`). The session\n  data for the authenticated user is stored inside the handler itself and added to every HTTP request.\n\n#### Web API Endpoints\n\n* `Fl32_Auth_Shared_Web_Api_Front_Register`: Registers the current frontend UUID on the backend and get identification\n  data in the response.\n* `Fl32_Auth_Shared_Web_Api_User_Register`: Registers the authentication data for current user on the backend (UUID,\n  encryption and signature keys, email and password).\n\n## Usage\n\nEvery user creates a pair of asymmetric keys on the frontend or can import saved keys to connect to the host as an\nexisting user. The user sends the public key, password (to change the public key), and email (to restore the password)\nto the host during sign-up. The stored keys are used to set up a user session (to identify the user for a given\nfrontend/browser on the backend). The session ID is stored in the local storage on the frontend and can be automatically\nreopened.\n\nTODO: do we really need sessions if we already have asymmetric encryption in place?\n\n## Front\n\n### `Fl32_Auth_Front_Mod_Session`\n\nInit the session in the frontend app:\n\n```javascript\nawait session.init();\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflancer32%2Fteq-ant-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflancer32%2Fteq-ant-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflancer32%2Fteq-ant-auth/lists"}