security

package
v1.13.9 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckServiceName

func CheckServiceName(service string) error

CheckServiceName returns if the given service name contains expected characters only.

func GetToken

func GetToken(authorization string) (string, error)

GetToken extracts token from Bearer scheme.

func VerifyToken

func VerifyToken(secretManager secrets.SecretManager, requestToken string) error

VerifyToken accepts a token and a service struct and verifies if this token is accepted.

Types

type Service

type Service struct {
	Name        string
	Environment string
}

Service holds the requesting service's name and environment.

func GetService

func GetService(incomingUserAgent string) (Service, error)

GetService returns the service name and environment based on the given user agent.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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