{"id":25666524,"url":"https://github.com/visiperf/visiauth","last_synced_at":"2026-04-17T06:03:35.770Z","repository":{"id":57531648,"uuid":"277485129","full_name":"visiperf/visiauth","owner":"visiperf","description":"A beautiful Go package to make authentication easier :)","archived":false,"fork":false,"pushed_at":"2022-11-09T13:44:34.000Z","size":117,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-02-24T08:38:22.408Z","etag":null,"topics":["jwt","package"],"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/visiperf.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":"2020-07-06T08:26:48.000Z","updated_at":"2022-08-22T14:38:50.000Z","dependencies_parsed_at":"2022-09-06T23:11:24.418Z","dependency_job_id":null,"html_url":"https://github.com/visiperf/visiauth","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/visiperf/visiauth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/visiperf%2Fvisiauth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/visiperf%2Fvisiauth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/visiperf%2Fvisiauth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/visiperf%2Fvisiauth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/visiperf","download_url":"https://codeload.github.com/visiperf/visiauth/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/visiperf%2Fvisiauth/sbom","scorecard":{"id":923686,"data":{"date":"2025-08-04","repo":{"name":"github.com/visiperf/visiauth","commit":"feba2ad0b50933fbcafb94c95c87b5e3eb895463"},"scorecard":{"version":"v5.2.1-28-gc1d103a9","commit":"c1d103a9bb9f635ec7260bf9aa0699466fa4be0e"},"score":2.2,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/17 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#pinned-dependencies"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 14 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":7,"reason":"3 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2025-3553 / GHSA-mh63-6h87-95cp","Warn: Project is vulnerable to: GO-2023-2153 / GHSA-m425-mq94-257g / GHSA-qppj-fm5r-hxr3","Warn: Project is vulnerable to: GO-2022-0603 / GHSA-hp87-p4gw-j4gq"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-25T08:14:42.486Z","repository_id":57531648,"created_at":"2025-08-25T08:14:42.486Z","updated_at":"2025-08-25T08:14:42.486Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31917372,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"online","status_checked_at":"2026-04-17T02:00:06.879Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":["jwt","package"],"created_at":"2025-02-24T08:30:41.014Z","updated_at":"2026-04-17T06:03:35.730Z","avatar_url":"https://github.com/visiperf.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Project goals\n\nThis package provides functions and service to help you making authentication verifications. You can retrieve and decode bearer tokens, such as User access token or M2M token.\n\n## Usage\n\n### Retrieve token\n\n#### gRPC Context\n\n```go\n// context metadata =\u003e Authorization: Bearer ...\n\ntoken, err := visiauth.RetrieveTokenFromContext(ctx)\nif err != nil {\n  ...\n}\n```\n\n#### HTTP Request\n\n```go\n// request header =\u003e Authorization: Bearer ...\n\ntoken, err := visiauth.RetrieveTokenFromRequest(req)\nif err != nil {\n  ...\n}\n```\n\n#### PubSub message attribute\n\n```go\n// message attribute =\u003e Authorization: Bearer ...\n\ntoken, err := visiauth.RetrieveTokenFromPubSubMessageAttribute(req)\nif err != nil {\n  ...\n}\n```\n\n### Decode token\n\n```go\nservice := visiauth.NewService(redis.NewJwkFetcher(), neo4j.NewUserRepository())\n\nidentity, err = service.DecodeAccessToken(r.Context(), token)\nif err != nil {\n  ...\n}\n```\n\n## Identities\n\nTwo types of identities are provided by service : User and Application.\n\n### User access token (User)\n\nIf token was generated using Client credentials flow, identity will be a user.\n\n```go\nuser, ok := identity.(*visiauth.User)\nif !ok {\n  ...\n}\n```\n\n### M2M Token (Application)\n\nIf token was generated using Client ID and Client secret, identity will be an application.\n\n```go\napp, ok := identity.(*visiauth.App)\nif !ok {\n  ...\n}\n```\n\n## Env vars\n\nSome environment vars are required to use `visiauth`.\nOnly vars of imported subpackages must be set.\n\n### Redis\n\n- VISIAUTH_REDIS_ADDR\n- VISIAUTH_REDIS_USER\n- VISIAUTH_REDIS_PASSWORD\n\n### Auth0\n\n- VISIAUTH_AUTH0_DOMAIN\n\n### Neo4j\n\n- VISIAUTH_NEO4J_USER\n- VISIAUTH_NEO4J_URI\n- VISIAUTH_NEO4J_PASSWORD","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvisiperf%2Fvisiauth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvisiperf%2Fvisiauth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvisiperf%2Fvisiauth/lists"}