# README
oauth2_proxy
A reverse proxy and static file server that provides authentication using Providers (Google, GitHub, and others) to validate accounts by email, domain or group.
Note: this is a fork of pusher/oauth2_proxy for my personal needs. You should probably use the "official" pusher version instead.
# Functions
LoggingHandler provides an http.Handler which logs requests to the HTTP server.
NewFileServer creates a http.Handler to serve files from the filesystem.
NewHtpasswd consctructs an HtpasswdFile from an io.Reader (opened file).
NewHtpasswdFromFile constructs an HtpasswdFile from the file at the path given.
NewOAuthProxy creates a new instance of OOuthProxy from the options provided.
NewOptions constructs a new Options with defaulted values.
NewReverseProxy creates a new reverse proxy for proxying requests to upstream servers.
NewUserMap parses the authenticated emails file into a new UserMap.
NewValidator constructs a function to validate email addresses.
NewWebSocketOrRestReverseProxy creates a reverse proxy for REST or websocket based on url.
WaitForReplacement waits for a file to exist on disk and then starts a watch for the file.
WatchForUpdates performs an action every time a file on disk is updated.
# Constants
SignatureHeader is the name of the request header containing the GAP Signature Part of hmacauth.
# Variables
ErrNeedsLogin means the user should be redirected to the login page.
SignatureHeaders contains the headers to be signed by the hmac algorithm Part of hmacauth.
VERSION contains version information.
# Structs
HtpasswdFile represents the structure of an htpasswd file.
OAuthProxy is the main authentication proxy.
Options holds Configuration Options that can be set by Command Line Flag, or Config File.
Server represents an HTTP server.
SignatureData holds hmacauth signature hash and key.
UpstreamProxy represents an upstream server to proxy to.
UserMap holds information from the authenticated emails file.
# Type aliases
EnvOptions holds program options loaded from the process environment.
StringArray is a type alias for a slice of strings.