{"id":27446908,"url":"https://github.com/finki-hub/finki-auth","last_synced_at":"2026-03-15T01:02:23.770Z","repository":{"id":287640777,"uuid":"965359310","full_name":"finki-hub/finki-auth","owner":"finki-hub","description":"Node authentication library for FINKI services","archived":false,"fork":false,"pushed_at":"2025-07-05T23:28:36.000Z","size":2508,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-06T00:25:31.392Z","etag":null,"topics":["auth","fcse","finki","npm"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/finki-auth","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/finki-hub.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-13T01:35:46.000Z","updated_at":"2025-07-05T23:28:38.000Z","dependencies_parsed_at":"2025-05-13T23:28:08.807Z","dependency_job_id":"29405a61-8ecf-4ea4-87ce-9d7b6bf1cec9","html_url":"https://github.com/finki-hub/finki-auth","commit_stats":null,"previous_names":["delemangi/finki-auth","finki-hub/finki-auth"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/finki-hub/finki-auth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finki-hub%2Ffinki-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finki-hub%2Ffinki-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finki-hub%2Ffinki-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finki-hub%2Ffinki-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/finki-hub","download_url":"https://codeload.github.com/finki-hub/finki-auth/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finki-hub%2Ffinki-auth/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263833246,"owners_count":23517365,"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":["auth","fcse","finki","npm"],"created_at":"2025-04-15T05:59:23.751Z","updated_at":"2026-03-15T01:02:23.752Z","avatar_url":"https://github.com/finki-hub.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FINKI Hub / FINKI Auth\n\nNode.js package for managing authentication and cookies for FCSE's services, built using [axios](https://github.com/axios/axios).\n\n## Features\n\nCurrently supports the following services:\n\n- [CAS](https://cas.finki.ukim.mk/)\n- [Courses](https://courses.finki.ukim.mk/)\n- [Diplomas](https://diplomski.finki.ukim.mk/)\n- [Old Courses](https://oldcourses.finki.ukim.mk/)\n- [Masters](https://magisterski.finki.ukim.mk/)\n- [Internships](https://internships.finki.ukim.mk/)\n- [Consultations](https://consultations.finki.ukim.mk/)\n\n## Installation\n\nYou can add the package to your NPM project by running `npm i finki-auth`.\n\n## Example\n\n```ts\nimport {\n  CasAuthentication,\n  Service,\n  isCookieValid,\n  isCookieHeaderValid,\n} from \"finki-auth\";\n\nconst credentials = {\n  username: \"example\",\n  password: \"secret_password\",\n};\n\nconst auth = new CasAuthentication(credentials);\n\nawait auth.authenticate(Service.COURSES);\n\n// Get array of cookie objects\nconst cookies = await auth.getCookie(Service.COURSES);\n\n// Get cookie header directly for sending requests\nconst cookieHeader = await auth.buildCookieHeader(Service.COURSES);\n\n// Check if the cookie is still valid, and if not, call `authenticate` again\nconst isCookieValid = await auth.isCookieValid(Service.COURSES);\n\nif (!isCookieValid) await auth.authenticate(Service.COURSES);\n\n// There are also some utility functions available:\nconst isCookieValidStandalone = await isCookieValid({\n  service: Service.COURSES,\n  cookies,\n});\n\nconst isCookieHeaderValidStandalone = await isCookieHeaderValid({\n  service: Service.COURSES,\n  cookieHeader,\n});\n```\n\n## License\n\nThis project is licensed under the terms of the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffinki-hub%2Ffinki-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffinki-hub%2Ffinki-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffinki-hub%2Ffinki-auth/lists"}