security

package
v0.0.0-...-7289f46 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const TokenFieldName = "authenticity_token"

TokenFieldName is the field name of the authenticity token in the meta and hidden form fields

Variables

This section is empty.

Functions

func IsAdmin

func IsAdmin(c buffalo.Context) bool

func LoggedInUser

func LoggedInUser(c buffalo.Context) string

func PopulateSession

func PopulateSession(c buffalo.Context, user goth.User)

Types

type AuthenticityToken

type AuthenticityToken struct {
	fmt.Stringer
	// contains filtered or unexported fields
}

AuthenticityToken holds an authenticity token and lets you print it out, etc...

func AuthenticityTokenFromCtx

func AuthenticityTokenFromCtx(c buffalo.Context) AuthenticityToken

AuthenticityTokenFromCtx gets the authenticity_token value from the session and returns it as a string. An empty string will be returned if there is no authenticity_token available

func (AuthenticityToken) String

func (a AuthenticityToken) String() string

Jump to

Keyboard shortcuts

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