authmidware

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2020 License: BSD-3-Clause Imports: 3 Imported by: 0

README

CleverGo Authentication Middleware

Build Status Coverage Status GoDoc Go Report Card Release

Usage

import (
    "github.com/clevergo/auth"
    "github.com/clevergo/auth/authenticators"
    "github.com/clevergo/authmidware"
)
authenticator := authenticators.NewBasicAuth(store)
router.Use(authmidware.New(authenticator))

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetIdentity added in v0.2.0

func GetIdentity(c *clevergo.Context) auth.Identity

GetIdentity retrieves a authenticated identity from context.

func New

func New(authenticator auth.Authenticator) clevergo.MiddlewareFunc

New returns a middleware with the given authenticator.

Types

This section is empty.

Jump to

Keyboard shortcuts

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