wirefallmiddleware

package module
v0.0.0-...-0e6658e Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2020 License: GPL-3.0 Imports: 5 Imported by: 0

README

wirefall-middleware

A gin-gonic middleware to forward authentication requests to wirefall


Usage

// Initialization
authMiddleware := wirefallmiddleware.New(cfg.WIREFALL_URL + "/auth/validate")

auth := router.Group("/auth")
	auth.Use(authMiddleware.Use())
	{
		auth.GET("/test", func(c *gin.Context) {
			example := c.MustGet("authorization").(bool)
            
            log.Println("Success:", example)
		})
	}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAuthRequest

func GetAuthRequest(url, token string) bool

Types

type WirefallMiddleware

type WirefallMiddleware struct {
	// contains filtered or unexported fields
}

func New

func New(authUrl string) *WirefallMiddleware

func (*WirefallMiddleware) Use

Jump to

Keyboard shortcuts

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