login

package
v0.0.38 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const ApiKeyMinCharacterLength = 32
View Source
const RootUsername = "root"

Variables

View Source
var ErrInvalidLogin = errors.New("Invalid login")

ErrInvalidLogin is returned when the login is not valid

View Source
var ErrNoBootstrapNoUsers = errors.New("You must specify RISER_BOOTSTRAP_APIKEY is required when there are no users. Use \"riser ops generate-apikey\" to generate the key.")

ErrNoBoostrapNoUsers is returned when no bootstrap is specified and no active users are provisioned in the DB

View Source
var ErrRootUserExists = errors.New("The root user already exists")

ErrRootUserExists is returned when the root user exists with an active API key

Functions

This section is empty.

Types

type Service

type Service interface {
	LoginWithApiKey(apiKeyPlainText string) (*core.User, error)
	BootstrapRootUser(apiKeyPlainText string) error
}

func NewService

func NewService(users core.UserRepository, apikeys core.ApiKeyRepository) Service

Jump to

Keyboard shortcuts

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