{"id":13408625,"url":"https://github.com/shaj13/go-guardian","last_synced_at":"2026-01-17T14:47:06.368Z","repository":{"id":37297135,"uuid":"263906148","full_name":"shaj13/go-guardian","owner":"shaj13","description":"Go-Guardian is a golang library that provides a simple, clean, and idiomatic way to create powerful modern API and web authentication.","archived":false,"fork":false,"pushed_at":"2024-07-25T18:04:35.000Z","size":356,"stargazers_count":605,"open_issues_count":13,"forks_count":61,"subscribers_count":5,"default_branch":"master","last_synced_at":"2026-01-15T07:19:08.848Z","etag":null,"topics":["2fa","auth","authentication","authenticator","bearer-tokens","certificate-authentication","go","go-guardian","go-passport","golang","golang-library","guardian","hotp","ldap","ldap-authentication","passport","strategies","tokens","totp","x509"],"latest_commit_sha":null,"homepage":"","language":"Go","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/shaj13.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,"publiccode":null,"codemeta":null}},"created_at":"2020-05-14T12:15:56.000Z","updated_at":"2026-01-09T20:09:59.000Z","dependencies_parsed_at":"2024-01-08T14:30:50.210Z","dependency_job_id":"3838c460-9196-40b9-8630-133d8f737bd7","html_url":"https://github.com/shaj13/go-guardian","commit_stats":null,"previous_names":["shaj13/go-passport"],"tags_count":58,"template":false,"template_full_name":null,"purl":"pkg:github/shaj13/go-guardian","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaj13%2Fgo-guardian","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaj13%2Fgo-guardian/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaj13%2Fgo-guardian/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaj13%2Fgo-guardian/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shaj13","download_url":"https://codeload.github.com/shaj13/go-guardian/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaj13%2Fgo-guardian/sbom","scorecard":{"id":815276,"data":{"date":"2025-08-11","repo":{"name":"github.com/shaj13/go-guardian","commit":"c25c80fad8ec3adf53a50c5c6943fd4e67e422e2"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.3,"checks":[{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":2,"reason":"Found 6/30 approved changesets -- score normalized to 2","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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/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 23 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T14:09:08.253Z","repository_id":37297135,"created_at":"2025-08-23T14:09:08.253Z","updated_at":"2025-08-23T14:09:08.253Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28510905,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T13:38:16.342Z","status":"ssl_error","status_checked_at":"2026-01-17T13:37:44.060Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["2fa","auth","authentication","authenticator","bearer-tokens","certificate-authentication","go","go-guardian","go-passport","golang","golang-library","guardian","hotp","ldap","ldap-authentication","passport","strategies","tokens","totp","x509"],"created_at":"2024-07-30T20:00:54.170Z","updated_at":"2026-01-17T14:47:06.345Z","avatar_url":"https://github.com/shaj13.png","language":"Go","funding_links":[],"categories":["Authentication and Authorization","Authentication and OAuth","Go","身份验证和OAuth","Uncategorized","认证和OAuth授权"],"sub_categories":["Contents"],"readme":"[![GoDoc](https://godoc.org/github.com/shaj13/go-guardian/v2?status.svg)](https://pkg.go.dev/github.com/shaj13/go-guardian/v2)\n[![Go Report Card](https://goreportcard.com/badge/github.com/shaj13/go-guardian)](https://goreportcard.com/report/github.com/shaj13/go-guardian)\n[![Coverage Status](https://coveralls.io/repos/github/shaj13/go-guardian/badge.svg?branch=master)](https://coveralls.io/github/shaj13/go-guardian?branch=master)\n[![CircleCI](https://circleci.com/gh/shaj13/go-guardian/tree/master.svg?style=svg)](https://circleci.com/gh/shaj13/go-guardian/tree/master)\n\n| :exclamation:  Cache package has been moved to [libcache](https://github.com/shaj13/libcache) repository |\n|----------------------------------------------------------------------------------------------------------|\n\n# Go-Guardian\nGo-Guardian is a golang library that provides a simple, clean, and idiomatic way to create powerful modern API and web authentication.\n\n## Overview \nGo-Guardian sole purpose is to authenticate requests, which it does through an extensible set of authentication methods known as strategies.\u003cbr\u003e\nGo-Guardian does not mount routes or assume any particular database schema, which maximizes flexibility and allows decisions to be made by the developer.\u003cbr\u003e\nThe API is simple: you provide go-guardian a request to authenticate, and go-guardian invoke strategies to authenticate end-user request.\u003cbr\u003e\nStrategies provide callbacks for controlling what occurs when authentication `should` succeeds or fails.\n\n## Installing \nUsing go-guardian is easy. First, use go get to install the latest version of the library.\n\n```sh\ngo get github.com/shaj13/go-guardian/v2\n```\nNext, include go-guardian in your application:\n```go\nimport \"github.com/shaj13/go-guardian/v2\"\n```\n\n## Why Go-Guardian?\nWhen building a modern application, you don't want to implement authentication module from scratch;\u003cbr\u003e\nyou want to focus on building awesome software. go-guardian is here to help with that.\n\nHere are a few bullet point reasons you might like to try it out:\n* provides simple, clean, and idiomatic API. \n* provides top trends and traditional authentication methods.\n* provides two-factor authentication and one-time password as defined in [RFC-4226](https://tools.ietf.org/html/rfc4226) and [RFC-6238](https://tools.ietf.org/html/rfc6238)\n* provides a mechanism to customize strategies, even enables writing a custom strategy\n\n## Strategies\n\u003e JWT, Opaque, and oauth2 packages provide early access to advanced or experimental\n\u003e functionality to get community feedback. Their APIs and functionality may be subject to\n\u003e breaking changes in future releases.\n\n* [JWT](https://pkg.go.dev/github.com/shaj13/go-guardian/v2/auth/strategies/jwt?tab=doc)\n* [Opaque(server-side consistent tokens)](https://pkg.go.dev/github.com/shaj13/go-guardian/v2/auth/strategies/opaque?tab=doc)\n* [Oauth2-JWT](https://pkg.go.dev/github.com/shaj13/go-guardian/v2/auth/strategies/oauth2/jwt?tab=doc)\n* [Oauth2-Introspection](https://pkg.go.dev/github.com/shaj13/go-guardian/v2/auth/strategies/oauth2/introspection?tab=doc)\n* [Oauth2-OpenID-userinfo](https://pkg.go.dev/github.com/shaj13/go-guardian/v2/auth/strategies/oauth2/userinfo?tab=doc)\n* [OpenID-IDToken](https://pkg.go.dev/github.com/shaj13/go-guardian/v2/auth/strategies/oauth2/jwt?tab=doc)\n* [kubernetes (Token Review)](https://pkg.go.dev/github.com/shaj13/go-guardian/v2/auth/strategies/kubernetes?tab=doc)\n* [2FA](https://pkg.go.dev/github.com/shaj13/go-guardian/v2/auth/strategies/twofactor?tab=doc)\n* [Certificate-Based](https://pkg.go.dev/github.com/shaj13/go-guardian/v2/auth/strategies/x509?tab=doc)\n* [Bearer-Token](https://pkg.go.dev/github.com/shaj13/go-guardian/v2/auth/strategies/token?tab=doc)\n* [Static-Token](https://pkg.go.dev/github.com/shaj13/go-guardian/v2/auth/strategies/token?tab=doc)\n* [LDAP](https://pkg.go.dev/github.com/shaj13/go-guardian/v2/auth/strategies/ldap?tab=doc)\n* [Basic](https://pkg.go.dev/github.com/shaj13/go-guardian/v2/auth/strategies/basic?tab=doc)\n* [Digest](https://pkg.go.dev/github.com/shaj13/go-guardian/v2/auth/strategies/digest?tab=doc)\n* [Union](https://pkg.go.dev/github.com/shaj13/go-guardian/v2/auth/strategies/union?tab=doc)\n\n# Examples \nExamples are available on [GoDoc](https://pkg.go.dev/github.com/shaj13/go-guardian/v2) or [Examples Folder](./_examples).\n\n# Documentation\nAPI docs are available on [GoDoc](https://pkg.go.dev/github.com/shaj13/go-guardian/v2).\n\n# Contributing\n\n1. Fork it\n2. Download your fork to your PC (`git clone https://github.com/your_username/go-guardian \u0026\u0026 cd go-guardian`)\n3. Create your feature branch (`git checkout -b my-new-feature`)\n4. Make changes and add them (`git add .`)\n5. Commit your changes (`git commit -m 'Add some feature'`)\n6. Push to the branch (`git push origin my-new-feature`)\n7. Create new pull request\n\n# License\nGo-Guardian is released under the MIT license. See [LICENSE](https://github.com/shaj13/go-guardian/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshaj13%2Fgo-guardian","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshaj13%2Fgo-guardian","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshaj13%2Fgo-guardian/lists"}