auth

package
v0.0.0-...-b2296ca Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2020 License: BSD-3-Clause Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Id        string    `json:"id"`
	Actor     string    `json:"actor"`
	Operation string    `json:"operation"`
	Value     []string  `json:"value"`
	Date      time.Time `json:"date"`
}

type Option

type Option struct {
	Dev bool   // enable dev mode
	URL string // The URL of the server
	DB  string // path to the DB
	Key string // private key file
	// Mail options, need to be processed
	MailHost     string
	MailLogin    string
	MailPassword string
}

The option to create a server

type Server

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

One server. Use Option to create it.

func Create

func Create(opt Option) *Server

func (*Server) Error

func (s *Server) Error(w http.ResponseWriter, r *http.Request, err string, code int)

func (*Server) GodLogin

func (s *Server) GodLogin(w http.ResponseWriter, r *http.Request)

func (*Server) GodUsers

func (s *Server) GodUsers(w http.ResponseWriter, r *http.Request)

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

type User

type User struct {
	public.UserInfo
	Cookie map[string]time.Time
}

All the informations about an user

type Visit

type Visit struct {
	public.UserInfo
	Creation time.Time `json:"creation"`
	Author   string    `json:"author"` // Author ID
	App      string    `json:"app"`    // the app ID
	URL      string    `json:"url"`    // the URL to the application auth
}

One invitation ticket

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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