security

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2019 License: Apache-2.0, BSD-3-Clause, MIT Imports: 9 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUserNotFound = errors.New("user identity must be provided when allowing authentication")

ErrUserNotFound error when authentication passed but no user found

Functions

func ForbiddenHTTPError

func ForbiddenHTTPError(description string) error

ForbiddenHTTPError returns HTTPError 403 with some description

func UnauthorizedHTTPError

func UnauthorizedHTTPError(description string) error

UnauthorizedHTTPError returns HTTPError 401 with some description

Types

type AESEncrypter added in v0.3.3

type AESEncrypter struct {
}

AESEncrypter is an encrypter that fetches the encryption key from a remote location

func (*AESEncrypter) Decrypt added in v0.3.3

func (e *AESEncrypter) Decrypt(_ context.Context, ciphertext []byte, key []byte) ([]byte, error)

Decrypt decrypts the cipher text with the provided key using AES

func (*AESEncrypter) Encrypt added in v0.3.3

func (e *AESEncrypter) Encrypt(_ context.Context, plaintext []byte, key []byte) ([]byte, error)

Encrypt encrypts the plaintext with the provided key using AES

type Encrypter

type Encrypter interface {
	Encrypt(ctx context.Context, plaintext, key []byte) ([]byte, error)
	Decrypt(ctx context.Context, ciphertext, key []byte) ([]byte, error)
}

Encrypter provides functionality to encrypt and decrypt data

Directories

Path Synopsis
Package authenticators contains logic for setting up an Open ID Connect authenticator
Package authenticators contains logic for setting up an Open ID Connect authenticator
httpfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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