caddyoauth

package module
v0.0.0-...-9c5c9dd Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

README

Caddy oidc auth plugin

Why not authcrunch

I don't want a separate portal for each individual resource.

Usage

oidc [<matcher>] {
    client_id <client_id>
    client_secret <client_secret>
    client_url <client_url>
    [scope <scope>]

    metadata_url <metadata_url>
    # or
    auth_url <auth_url>
    token_url <token_url>
    issuer <issuer>
    [userinfo_url <userinfo_url>]
    [end_session_url <end_session_url>]
}

You may want other authz plugins to work with.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OIDCAuth

type OIDCAuth struct {
	caddyhttp.MiddlewareHandler `json:"-"`
	// contains filtered or unexported fields
}

func (*OIDCAuth) Authenticate

func (o *OIDCAuth) Authenticate(w http.ResponseWriter, r *http.Request) (User, bool, error)

func (OIDCAuth) CaddyModule

func (o OIDCAuth) CaddyModule() caddy.ModuleInfo

func (*OIDCAuth) Error

func (o *OIDCAuth) Error(err error)

func (*OIDCAuth) GetClientCallbackURLString

func (cfg *OIDCAuth) GetClientCallbackURLString() (string, error)

func (*OIDCAuth) GetClientLogoutURLString

func (cfg *OIDCAuth) GetClientLogoutURLString() (string, error)

func (*OIDCAuth) GetClientRedirectURL

func (cfg *OIDCAuth) GetClientRedirectURL() (url.URL, error)

func (*OIDCAuth) GetClientURL

func (cfg *OIDCAuth) GetClientURL() (url.URL, error)

func (*OIDCAuth) Provision

func (o *OIDCAuth) Provision(ctx caddy.Context) (err error)

func (OIDCAuth) ServeHTTP

func (o OIDCAuth) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error

func (*OIDCAuth) Validate

func (o *OIDCAuth) Validate() error

type User

type User = caddyauth.User

Jump to

Keyboard shortcuts

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