Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shaj13/go-guardian
Go-Guardian is a golang library that provides a simple, clean, and idiomatic way to create powerful modern API and web authentication.
https://github.com/shaj13/go-guardian
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
Last synced: 14 days ago
JSON representation
Go-Guardian is a golang library that provides a simple, clean, and idiomatic way to create powerful modern API and web authentication.
- Host: GitHub
- URL: https://github.com/shaj13/go-guardian
- Owner: shaj13
- License: mit
- Created: 2020-05-14T12:15:56.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-07-25T18:04:35.000Z (4 months ago)
- Last Synced: 2024-07-31T20:31:33.264Z (3 months ago)
- 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
- Language: Go
- Homepage:
- Size: 348 KB
- Stars: 535
- Watchers: 6
- Forks: 57
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-go - go-guardian - Go-Guardian is a golang library that provides a simple, clean, and idiomatic way to create powerful modern API and web authentication that supports LDAP, Basic, Bearer token, and Certificate based authentication. (Authentication and OAuth)
- awesome-go - go-guardian - Go-Guardian is a golang library that provides a simple, clean, and idiomatic way to create powerful modern API and web authentication that supports LDAP, Basic, Bearer token, and Certificate based authentication. (Authentication and OAuth)
- awesome-go-with-stars - go-guardian - Go-Guardian is a golang library that provides a simple, clean, and idiomatic way to create powerful modern API and web authentication that supports LDAP, Basic, Bearer token, and Certificate based authentication. (Authentication and OAuth)
- awesome-Char - go-guardian - Go-Guardian is a golang library that provides a simple, clean, and idiomatic way to create powerful modern API and web authentication that supports LDAP, Basic, Bearer token and Certificate based authentication. (Authentication and OAuth / Contents)
- awesome-go-stars - go-guardian(stars: 524) - Go-Guardian is a golang library that provides a simple, clean, and idiomatic way to create powerful modern API and web authentication that supports LDAP, Basic, Bearer token, and Certificate based authentication. (Authentication and OAuth)
- awesome-go - go-guardian - Go-Guardian is a golang library that provides a simple, clean, and idiomatic way to create powerful modern API and web authentication that supports LDAP, Basic, Bearer token, and Certificate based authentication. (Authentication and OAuth)
- awesome-go - go-guardian - Go-Guardian is a golang library that provides a simple, clean, and idiomatic way to create powerful modern API and web authentication that supports LDAP, Basic, Bearer token and Certificate based authentication. (Authentication and OAuth)
- awesome-go - go-guardian - Go-Guardian is a golang library that provides a simple, clean, and idiomatic way to create powerful modern API and web authentication that supports LDAP, Basic, Bearer token, and Certificate based authentication. (Authentication and OAuth)
- awesome-go-cn - go-guardian - Guardian支持以简洁又清晰的方式来进行`API`认证和`web`认证,认证模型支持`LDAP`、`Basic`、`Bearer token`和基于证书的认证 (认证和OAuth授权)
- fucking-awesome-go - go-guardian - Go-Guardian is a golang library that provides a simple, clean, and idiomatic way to create powerful modern API and web authentication that supports LDAP, Basic, Bearer token, and Certificate based authentication. (Authentication and OAuth)
- fucking-awesome-go - go-guardian - Go-Guardian is a golang library that provides a simple, clean, and idiomatic way to create powerful modern API and web authentication that supports LDAP, Basic, Bearer token, and Certificate based authentication. (Authentication and OAuth)
- awesome-go-plus - go-guardian - Go-Guardian is a golang library that provides a simple, clean, and idiomatic way to create powerful modern API and web authentication that supports LDAP, Basic, Bearer token, and Certificate based authentication. (Authentication and OAuth)
- awesome-go-plus - go-guardian - Go-Guardian is a golang library that provides a simple, clean, and idiomatic way to create powerful modern API and web authentication that supports LDAP, Basic, Bearer token, and Certificate based authentication. ![stars](https://img.shields.io/badge/stars-559-blue) ![forks](https://img.shields.io/badge/forks-56-blue) (Authentication and OAuth)
README
[![GoDoc](https://godoc.org/github.com/shaj13/go-guardian/v2?status.svg)](https://pkg.go.dev/github.com/shaj13/go-guardian/v2)
[![Go Report Card](https://goreportcard.com/badge/github.com/shaj13/go-guardian)](https://goreportcard.com/report/github.com/shaj13/go-guardian)
[![Coverage Status](https://coveralls.io/repos/github/shaj13/go-guardian/badge.svg?branch=master)](https://coveralls.io/github/shaj13/go-guardian?branch=master)
[![CircleCI](https://circleci.com/gh/shaj13/go-guardian/tree/master.svg?style=svg)](https://circleci.com/gh/shaj13/go-guardian/tree/master)| :exclamation: Cache package has been moved to [libcache](https://github.com/shaj13/libcache) repository |
|----------------------------------------------------------------------------------------------------------|# Go-Guardian
Go-Guardian is a golang library that provides a simple, clean, and idiomatic way to create powerful modern API and web authentication.## Overview
Go-Guardian sole purpose is to authenticate requests, which it does through an extensible set of authentication methods known as strategies.
Go-Guardian does not mount routes or assume any particular database schema, which maximizes flexibility and allows decisions to be made by the developer.
The API is simple: you provide go-guardian a request to authenticate, and go-guardian invoke strategies to authenticate end-user request.
Strategies provide callbacks for controlling what occurs when authentication `should` succeeds or fails.## Installing
Using go-guardian is easy. First, use go get to install the latest version of the library.```sh
go get github.com/shaj13/go-guardian/v2
```
Next, include go-guardian in your application:
```go
import "github.com/shaj13/go-guardian/v2"
```## Why Go-Guardian?
When building a modern application, you don't want to implement authentication module from scratch;
you want to focus on building awesome software. go-guardian is here to help with that.Here are a few bullet point reasons you might like to try it out:
* provides simple, clean, and idiomatic API.
* provides top trends and traditional authentication methods.
* 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)
* provides a mechanism to customize strategies, even enables writing a custom strategy## Strategies
> JWT, Opaque, and oauth2 packages provide early access to advanced or experimental
> functionality to get community feedback. Their APIs and functionality may be subject to
> breaking changes in future releases.* [JWT](https://pkg.go.dev/github.com/shaj13/go-guardian/v2/auth/strategies/jwt?tab=doc)
* [Opaque(server-side consistent tokens)](https://pkg.go.dev/github.com/shaj13/go-guardian/v2/auth/strategies/opaque?tab=doc)
* [Oauth2-JWT](https://pkg.go.dev/github.com/shaj13/go-guardian/v2/auth/strategies/oauth2/jwt?tab=doc)
* [Oauth2-Introspection](https://pkg.go.dev/github.com/shaj13/go-guardian/v2/auth/strategies/oauth2/introspection?tab=doc)
* [Oauth2-OpenID-userinfo](https://pkg.go.dev/github.com/shaj13/go-guardian/v2/auth/strategies/oauth2/userinfo?tab=doc)
* [OpenID-IDToken](https://pkg.go.dev/github.com/shaj13/go-guardian/v2/auth/strategies/oauth2/jwt?tab=doc)
* [kubernetes (Token Review)](https://pkg.go.dev/github.com/shaj13/go-guardian/v2/auth/strategies/kubernetes?tab=doc)
* [2FA](https://pkg.go.dev/github.com/shaj13/go-guardian/v2/auth/strategies/twofactor?tab=doc)
* [Certificate-Based](https://pkg.go.dev/github.com/shaj13/go-guardian/v2/auth/strategies/x509?tab=doc)
* [Bearer-Token](https://pkg.go.dev/github.com/shaj13/go-guardian/v2/auth/strategies/token?tab=doc)
* [Static-Token](https://pkg.go.dev/github.com/shaj13/go-guardian/v2/auth/strategies/token?tab=doc)
* [LDAP](https://pkg.go.dev/github.com/shaj13/go-guardian/v2/auth/strategies/ldap?tab=doc)
* [Basic](https://pkg.go.dev/github.com/shaj13/go-guardian/v2/auth/strategies/basic?tab=doc)
* [Digest](https://pkg.go.dev/github.com/shaj13/go-guardian/v2/auth/strategies/digest?tab=doc)
* [Union](https://pkg.go.dev/github.com/shaj13/go-guardian/v2/auth/strategies/union?tab=doc)# Examples
Examples are available on [GoDoc](https://pkg.go.dev/github.com/shaj13/go-guardian/v2) or [Examples Folder](./_examples).# Documentation
API docs are available on [GoDoc](https://pkg.go.dev/github.com/shaj13/go-guardian/v2).# Contributing
1. Fork it
2. Download your fork to your PC (`git clone https://github.com/your_username/go-guardian && cd go-guardian`)
3. Create your feature branch (`git checkout -b my-new-feature`)
4. Make changes and add them (`git add .`)
5. Commit your changes (`git commit -m 'Add some feature'`)
6. Push to the branch (`git push origin my-new-feature`)
7. Create new pull request# License
Go-Guardian is released under the MIT license. See [LICENSE](https://github.com/shaj13/go-guardian/blob/master/LICENSE)