Categorygithub.com/pantheon-systems/go-certauth
modulepackage
0.0.0-20240607214602-7786c81faa2e
Repository: https://github.com/pantheon-systems/go-certauth.git
Documentation: pkg.go.dev

# README

certauth

Go Report Card Unsupported

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

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# 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.