package module
v1.4.39 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2022 License: Apache-2.0 Imports: 22 Imported by: 3



Authentication Plugin for Caddy v2 implementing Form-Based, Basic, Local, LDAP, OpenID Connect, OAuth 2.0, SAML Authentication.

Documentation: authp.github.io

Security Policy: SECURITY.md

Please show your appreciation for this work and ⭐ ⭐ ⭐

Please ask questions either here or via LinkedIn. I am happy to help you! @greenpau

Please see other plugins:

Download Caddy with the plugins enabled:

Getting Started

  • Setting Up Local Authentication: Video and Config Gist
  • Login with App Authenticator and Yubico U2F: Video

User Interface

User Login


User Identity (whoami)

User Settings

Password Management

Add U2F Token (Yubico)

Add Authenticator App

Multi-Factor Authentication




This section is empty.


This section is empty.


func GetRequestID added in v1.0.15

func GetRequestID(r *http.Request) string

GetRequestID returns request ID.


type AuthMiddleware added in v1.2.6

type AuthMiddleware struct {
	Portal *authn.Authenticator `json:"authp,omitempty"`

AuthMiddleware implements Form-Based, Basic, Local, LDAP, OpenID Connect, OAuth 2.0, SAML Authentication.

func (AuthMiddleware) CaddyModule added in v1.2.6

func (AuthMiddleware) CaddyModule() caddy.ModuleInfo

CaddyModule returns the Caddy module information.

func (*AuthMiddleware) Provision added in v1.2.6

func (m *AuthMiddleware) Provision(ctx caddy.Context) error

Provision provisions authentication portal provider

func (AuthMiddleware) ServeHTTP added in v1.2.6

ServeHTTP authorizes access based on the presense and content of JWT token.

func (*AuthMiddleware) UnmarshalCaddyfile added in v1.4.15

func (m *AuthMiddleware) UnmarshalCaddyfile(d *caddyfile.Dispenser) (err error)

UnmarshalCaddyfile unmarshals a caddyfile

func (*AuthMiddleware) Validate added in v1.2.6

func (m *AuthMiddleware) Validate() error

Validate implements caddy.Validator.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL