auth_service

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() (sdk.UserService, error)

New - Instansiate a New concrete dev auth plugin

func NewWithDriver

func NewWithDriver(driver ScribbleIface) sdk.UserService

Types

type LocalAuthService

type LocalAuthService struct {
	// contains filtered or unexported fields
}

LocalAuthService - The dev implementation for the Nitric Auth Plugin

func (*LocalAuthService) Create

func (s *LocalAuthService) Create(tenant string, id string, email string, password string) error

CreateUser - Create a new user using scribble as the DB

type ScribbleIface

type ScribbleIface interface {
	Read(string, string, interface{}) error
	ReadAll(string) ([]string, error)
	Write(string, string, interface{}) error
	Delete(string, string) error
}

type User

type User struct {
	ID             string `json:"id"`
	Email          string `json:"email"`
	PwdHashAndSalt string `json:"pwdHashAndSalt"`
}

User - The local user entity representation

Jump to

Keyboard shortcuts

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