# README
certauth
This package provides TLS certificate based authentication middleware. Our goal is
compatibility with net/http
, httprouter
and possibly other popular Go HTTP
routers.
Usage
Examples of usage with various http router libs in the ./examples
directory.
Contributing
@TODO: a couple steps
Acknowledgments
A big thanks to the https://github.com/unrolled/secure project whose approach to writing middleware helped us figure out our approach to creating this project.
TODO
- add support for github.com/julienschmidt/httprouter
- add examples for using with net/http and httprouter
- makefile with gvt for deps now that we're depending on httprouter
- circle.yml
- add helper for compatibility with negroni (example: https://github.com/unrolled/secure/blob/v1/secure.go#L110-L111)
# Functions
AllowOUsandCNs is a convenience function which produces an AuthorizationChecker from a list of allowed OUs and CNs.
No description provided by the author
**DEPRECATED** use New instead NewAuth returns an auth.
WithCheckers configures an Auth with the given checkers so that the Auth will pass when all the checkers in any WithCheckers AuthOption pass.
No description provided by the author
No description provided by the author
# Constants
HasAuthorizedCN is used as the request context key, adding info about the authroized CN if authorization succeeded.
HasAuthorizedOU is used as the request context key, adding info about the authorized OU if authorization succeded.
# Structs
AllowSpecificOUandCNs is an AuthorizationChecker which allows access to resources for the specific Organizational Units and common names.
Auth is an instance of the middleware.
**DEPRECATED** use New with AuthOptions instead Options is the configuration for a Auth handler.
# Interfaces
AuthorizationChecker provides an interface for checking request authorization programatically.
ContextKey and ContextValue are type aliases to make the code a bit more readable.
No description provided by the author
# Type aliases
AuthOption is a type of function for configuring an Auth.