user

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HashUserService

type HashUserService struct {
}

func (HashUserService) LoginUser

func (us HashUserService) LoginUser(username string, plainPassword string) error

func (HashUserService) UniqueUser

func (us HashUserService) UniqueUser(provider string, providerUserID string) (string, error)

type PlainUserService

type PlainUserService struct {
}

func (PlainUserService) UniqueUser

func (us PlainUserService) UniqueUser(provider string, providerUserID string) (string, error)

type UserService

type UserService interface {
	UniqueUser(provider string, providerUserID string) (string, error)
}

UserService provides a function for creating a user from the given provider and providerUserID. The created user contains the global unique user ID that is used within your environment. user/hashuserservice is the most basic way to create a unique user by simply hashing both the provider and providerUserID. It would also be possible to load the user id from a DB using the provider and providerUserID as a key or just concatenate both strings.

Jump to

Keyboard shortcuts

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