security

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2021 License: MIT Imports: 8 Imported by: 8

Documentation

Index

Constants

View Source
const (
	Issuer     = "Ittech24.co.uk"
	LoginScope = "authorization"
	PrivateKey = "somerandomshit"
)

Security Constants

Variables

This section is empty.

Functions

func AuthenticateMiddleware

func AuthenticateMiddleware(target http.HandlerFunc) http.Handler

func GenerateUserToken

func GenerateUserToken(email string) (string, string)

GenerateUserToken generates a jwt user token

func GetAuthorizationToken

func GetAuthorizationToken(request http.Header) (string, bool)

func SHA256Encode

func SHA256Encode(value string) string

SHA256Encode Hash string with SHA256

func ValidateToken

func ValidateToken(token string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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