Documentation ¶
Overview ¶
Package guardian . Go-Guardian is a golang library that provides a simple, clean, and idiomatic way to create powerful modern API and web authentication.
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.
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 a package to caches the authentication decisions, based on different mechanisms and algorithms.
- 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
Directories ¶
Path | Synopsis |
---|---|
claims
Package claims collects common jwt types.
|
Package claims collects common jwt types. |
internal
Package internal contains support & helpers for go-guardian packages.
|
Package internal contains support & helpers for go-guardian packages. |
strategies/basic
Package basic provides authentication strategy, to authenticate HTTP requests using the standard basic scheme.
|
Package basic provides authentication strategy, to authenticate HTTP requests using the standard basic scheme. |
strategies/digest
Package digest provides authentication strategy, to authenticate HTTP requests using the standard digest scheme as described in RFC 7616.
|
Package digest provides authentication strategy, to authenticate HTTP requests using the standard digest scheme as described in RFC 7616. |
strategies/jwt
Package jwt provides authentication strategy, to authenticate HTTP requests based on jwt token.
|
Package jwt provides authentication strategy, to authenticate HTTP requests based on jwt token. |
strategies/kubernetes
Package kubernetes provide auth strategy to authenticate, incoming HTTP requests using a Kubernetes Service Account Token.
|
Package kubernetes provide auth strategy to authenticate, incoming HTTP requests using a Kubernetes Service Account Token. |
strategies/ldap
Package ldap provides authentication strategy, to authenticate HTTP requests and builds, extracts user informations from LDAP Server.
|
Package ldap provides authentication strategy, to authenticate HTTP requests and builds, extracts user informations from LDAP Server. |
strategies/oauth2/introspection
Package introspection provide auth strategy to authenticate, incoming HTTP requests using the oauth2 token introspection endpoint, as defined in RFC 7662.
|
Package introspection provide auth strategy to authenticate, incoming HTTP requests using the oauth2 token introspection endpoint, as defined in RFC 7662. |
strategies/oauth2/jwt
Package jwt provides authentication strategy, incoming HTTP requests using the oauth2 jwt access token or openid IDToken.
|
Package jwt provides authentication strategy, incoming HTTP requests using the oauth2 jwt access token or openid IDToken. |
strategies/oauth2/userinfo
Package userinfo provide auth strategy to authenticate, incoming HTTP requests using the oauth2/openid userinfo endpoint, as defined in OpenID Connect https://openid.net/specs/openid-connect-core-1_0.html#UserInfo.
|
Package userinfo provide auth strategy to authenticate, incoming HTTP requests using the oauth2/openid userinfo endpoint, as defined in OpenID Connect https://openid.net/specs/openid-connect-core-1_0.html#UserInfo. |
strategies/opaque
Package opaque provides server-side consistent tokens.
|
Package opaque provides server-side consistent tokens. |
strategies/token
Package token provides authentication strategy, to authenticate HTTP requests based on token.
|
Package token provides authentication strategy, to authenticate HTTP requests based on token. |
strategies/twofactor
Package twofactor provides authentication strategy, to authenticate HTTP requests based on one time password(otp).
|
Package twofactor provides authentication strategy, to authenticate HTTP requests based on one time password(otp). |
strategies/x509
Package x509 provides authentication strategy, to authenticate HTTPS requests and builds, extracts user informations from client certificates.
|
Package x509 provides authentication strategy, to authenticate HTTPS requests and builds, extracts user informations from client certificates. |
Package otp (one-time passwords) provides a simple, clean, and idiomatic way for generating and verifying one-time passwords for both HOTP and TOTP defined in RFC 4226 and 6238.
|
Package otp (one-time passwords) provides a simple, clean, and idiomatic way for generating and verifying one-time passwords for both HOTP and TOTP defined in RFC 4226 and 6238. |