auth

package module
v0.0.0-...-13896a5 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: MPL-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthInterceptor

func AuthInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)

func CheckPassword

func CheckPassword(p string, hp string) error

CheckPassword checks if the provided plaintext password is equivalent to the hashed password

func HashPassword

func HashPassword(p string) (string, error)

HashPassword returns the hashed password

Types

type Session

type Session struct {
	Data struct {
		Name      string `json:"name"`      // unique name of the org
		ID        int    `json:"id"`        // org id
		FirstName string `json:"firstName"` // user first name
		LastName  string `json:"lastName"`  // user last name
		UserID    int    `json:"userId"`    // user id
	} `json:"data"`
}

Jump to

Keyboard shortcuts

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