auth

package
v0.0.0-...-379397d Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicAuth

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

BasicAuth allows users to login using a username and password RemoteAuth

func NewBasicAuth

func NewBasicAuth(sparrow *core.Sparrow) BasicAuth

NewBasicAuth creates a new BasicAuth. Reads users data from config files

func (*BasicAuth) Login

func (basicAuth *BasicAuth) Login(ws *core.Conn, user core.User, tweet *core.Tweet)

Login processes the incoming tweet and allows user to login if user name and password found in UserIDs map

type DevAuth

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

DevAuth is a development only twitter this twitter allows any users to login without authentecation

func NewDevAuth

func NewDevAuth(sparrow *core.Sparrow) DevAuth

NewDevAuth creates a new DevAuth

func (*DevAuth) Login

func (devAuth *DevAuth) Login(ws *core.Conn, token []byte) bool

Login processes the incoming tweet and allows user to login

type RemoteAuth

type RemoteAuth struct {
	APIEndpoint string
	Token       string
	// contains filtered or unexported fields
}

BasicAuth allows users to login using a remote services

func NewRemoteAuth

func NewRemoteAuth(sparrow *core.Sparrow) *RemoteAuth

NewRemoteAuth creates a new RemoteAuth

func (*RemoteAuth) Login

func (remoteAuth *RemoteAuth) Login(ws *core.Conn, token []byte) bool

type TokenAuth

type TokenAuth struct {
	APIEndpoint string
	Token       string
}

TokenAuth allow users to login using JWT token

func NewTokenAuth

func NewTokenAuth() TokenAuth

func (*TokenAuth) Login

func (tokenAuth *TokenAuth) Login(ws *core.Conn, inputToken []byte) bool

Jump to

Keyboard shortcuts

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