sol

package module
v0.0.0-...-589e68f Latest Latest
Warning

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

Go to latest
Published: May 21, 2019 License: MIT Imports: 26 Imported by: 0

README

sol

An authentication module for nebula

Created for the sake of learning (and memes)

You may also visit cosban.net which will always be running the latest version of sol.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildModule

func BuildModule(hub *hub.Hub) core.Module

BuildModule builds Sol as an Authenticator and a Shepard for Nebula

Types

type Sol

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

func (*Sol) Authenticate

func (s *Sol) Authenticate(username, hash, totp string) (core.User, error)

func (*Sol) ConfirmPage

func (s *Sol) ConfirmPage(w http.ResponseWriter, r *http.Request, vars map[string]string) (interface{}, error)

ConfirmPage is the page a user is sent to after a successful registration. It will provide the user with a QR code to use for registration of the TOTP secret with their OTP authenticator app

func (*Sol) ConfirmRegistration

func (s *Sol) ConfirmRegistration(w http.ResponseWriter, r *http.Request, i interface{}) *core.PayloadResponse

func (*Sol) Disconnect

func (s *Sol) Disconnect(session string) error

func (*Sol) ExpireNow

func (s *Sol) ExpireNow(r *http.Request, w http.ResponseWriter) error

func (*Sol) Fillers

func (s *Sol) Fillers() map[string]core.Filler

Fillers returns a map of all of the endpoint URLs to their handler

func (*Sol) Forgot

func (s *Sol) Forgot(w http.ResponseWriter, r *http.Request, i interface{}) *core.PayloadResponse

Forgot begins the password reset process

func (*Sol) GetReceipt

func (s *Sol) GetReceipt(r *http.Request, name string) string

func (*Sol) GetUser

func (s *Sol) GetUser(userid uint32) core.User

func (*Sol) GetUserFromConnection

func (s *Sol) GetUserFromConnection(r *http.Request) core.User

func (*Sol) GetUserFromUsername

func (s *Sol) GetUserFromUsername(username string) core.User

func (*Sol) IsConnected

func (s *Sol) IsConnected(user core.User) bool

func (*Sol) ListUsers

func (s *Sol) ListUsers(w http.ResponseWriter, r *http.Request, vars map[string]string) (interface{}, error)

func (*Sol) Login

func (s *Sol) Login(w http.ResponseWriter, r *http.Request, i interface{}) *core.PayloadResponse

func (*Sol) Logout

func (s *Sol) Logout(w http.ResponseWriter, r *http.Request, i interface{}) *core.PayloadResponse

func (*Sol) Name

func (*Sol) Name() string

Name returns the name of the module

func (*Sol) Posters

func (s *Sol) Posters() map[string]core.Poster

Posters handles returns a map of all poster endpoints keyed by their URL

func (*Sol) ProfilePage

func (s *Sol) ProfilePage(w http.ResponseWriter, r *http.Request, vars map[string]string) (interface{}, error)

func (*Sol) Recover

func (s *Sol) Recover(w http.ResponseWriter, r *http.Request, i interface{}) *core.PayloadResponse

Recover finalizes the password reset process

func (*Sol) RecoverPage

func (s *Sol) RecoverPage(w http.ResponseWriter, r *http.Request, vars map[string]string) (interface{}, error)

func (*Sol) Register

func (s *Sol) Register(user core.User) error

func (*Sol) RequestRegisteration

func (s *Sol) RequestRegisteration(w http.ResponseWriter, r *http.Request, i interface{}) *core.PayloadResponse

func (*Sol) SetReceipt

func (s *Sol) SetReceipt(r *http.Request, w http.ResponseWriter, receipt string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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