auth

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service handles Authentication and other similar functionality within the package.

func (*Service) Signin

func (service *Service) Signin(w http.ResponseWriter, r *http.Request)

Signin compares inputted user credentials against the user database.

func (*Service) Signup

func (service *Service) Signup(w http.ResponseWriter, r *http.Request)

Signup creates a new user and makes an entry in the database.

func (*Service) Startup

func (service *Service) Startup()

Startup initializes the Service object.

type User

type User struct {
	core.DBObject
	Email    string `json:"email" db:"email"`
	Password string `json:"password" db:"password"`
	Username string `json:"username" db:"username"`
}

User is the struct that stores credentials for authentication.

Jump to

Keyboard shortcuts

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