Documentation ¶
Index ¶
- Constants
- func CheckPassword(hashedPassword string, password string) error
- func HashPassword(password string) (string, error)
- func InvalidateSession(session sessions.Session)
- func InvalidateSessionAndCache(redisClient *redis.Client, ctx context.Context, session sessions.Session)
- func RandomEmail() string
- func RandomString(length int) string
- type Config
- type UIConfig
Constants ¶
View Source
const (
SessionIdKey = "session_id"
)
Variables ¶
This section is empty.
Functions ¶
func CheckPassword ¶
func HashPassword ¶
func InvalidateSession ¶
func RandomEmail ¶
func RandomEmail() string
func RandomString ¶
Generates a random string of a given length using a specific character set
Types ¶
type Config ¶
type Config struct { DBSource string `mapstructure:"BINDER_DB_SOURCE"` DBDriver string `mapstructure:"BINDER_DB_DRIVER"` ServerAddress string `mapstructure:"BINDER_API_SERVER_ADDRESS"` TokenSymmetricKey string `mapstructure:"BINDER_TOKEN_SYMMETRIC_KEY"` AccessTokenDuration time.Duration `mapstructure:"BINDER_ACCESS_TOKEN_DURATION"` RefreshTokenDuration time.Duration `mapstructure:"BINDER_REFRESH_TOKEN_DURATION"` }
func LoadConfig ¶
Click to show internal directories.
Click to hide internal directories.