Categorygithub.com/EndFirstCorp/auth
modulepackage
0.0.0-20200927010206-f7f324f2554a
Repository: https://github.com/endfirstcorp/auth.git
Documentation: pkg.go.dev

# README

nginxauth

Build Status Coverage Status

A Go http server or middleware that can be used as an authentication backend with NGINX or directly in a Go web server Capabilities included:

  1. Session management (through Redis by default)
  2. User authentication and hashing (OpenLDAP or SQL database)
  3. Email notification

# Packages

No description provided by the author

# Functions

GetInfo will return the named info as an interface{}.
GetInfoInts will return the named info as an array of integers.
GetInfoString will return the named info as a string.
GetInfoStrings will return the named info as an array of strings.
NewAuthStore is used to create an AuthStorer for most authentication needs.
NewBackend returns a Backender from a UserBackender, LoginBackender and SessionBackender.
NewBackendMemory creates a memory-backed Backender.
NewBackendMongo creates a MongoDB-based Backender.
NewBackendRedisSession returns a SessionBackender for Redis.
NewFakeStorer returns a fake AuthStorer that can be used for testing.

# Structs

AuthError struct holds detailed auth error info.
CryptoHashStore encrypts using an iterated hash with configurable number of iterations.
Emailer struct contains parsed glob of email templates a Sender interface to send emails.
EmailSendParams contains information necessary to send an email to the user.
FakeStorerConfig stores the config for a Fake AuthStorer.
LoginSession is the struct which holds session information.
No description provided by the author
No description provided by the author
User is the struct which holds user information.

# Interfaces

AuthStorer interface provides the necessary functionality to get and store authentication information.
Backender interface contains all the methods needed to read and write users, sessions and logins.
CookieStorer interface provides the necessary methods for handling cookies.
Crypter interface is used to store the password hash and to compare two password hashes together for equality.
FakeStorer is a fake AuthStorer for testing and includes MethodsCalled to track what was called.
Mailer interface includes method needed to send communication to users on account updates.
SessionBackender interface holds methods for session management.
UserBackender interface holds methods for user management.