security

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2022 License: MIT Imports: 10 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 DecodeBase64String added in v0.0.10

func DecodeBase64String(value string) (string, error)

func EncodeString added in v0.0.10

func EncodeString(value string) (string, error)

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