Versions in this module Expand all Collapse all v0 v0.1.43 Sep 10, 2021 v0.1.42 Sep 8, 2021 Changes in this version + const NIterations + var BaseServerUrl string + var DB *sql.DB + var DbFlag = make(map[string]bool) + var GitCommit string + var QueryConfig = []ymux.CrudQueryConfig + var StoredProcConfig = []ymux.CrudStoredProcConfig + var TableConfig = []ymux.CrudConfig + func AddCookie(w http.ResponseWriter, name, value string, inDays int) + func AddSecureCookie(w http.ResponseWriter, name, value string, inDays int) + func CheckPassword(pw string, ignore bool) bool + func GenPassword() string + func GenRedisQRKey(qr_id string) (rv string) + func GenUUID() string + func GenerateQRCodeURL(qr_id string, ty string) (qr_url string) + func GenerateSecret() string + func GetRedisValues(key string) (rv string, err error) + func Handle2FADevSetup(www http.ResponseWriter, req *http.Request) + func Handle2FAGetMoreDevOtk(www http.ResponseWriter, req *http.Request) + func Handle2FASetup(www http.ResponseWriter, req *http.Request) + func Handle2FAValidatePin(www http.ResponseWriter, req *http.Request) + func HandleAdminChangePassword(www http.ResponseWriter, req *http.Request) + func HandleChangePassword(www http.ResponseWriter, req *http.Request) + func HandleComplete2FASetup(www http.ResponseWriter, req *http.Request) + func HandleConfirmEmail(www http.ResponseWriter, req *http.Request) + func HandleCreateRegistrationToken(www http.ResponseWriter, req *http.Request) + func HandleDeleteDevUnPwOrTokenAcct(www http.ResponseWriter, req *http.Request) + func HandleDevUnPwLogin(www http.ResponseWriter, req *http.Request) + func HandleIs2FASetup(www http.ResponseWriter, req *http.Request) + func HandleIsEmailUsed(www http.ResponseWriter, req *http.Request) + func HandleIsPasswordValid(www http.ResponseWriter, req *http.Request) + func HandleIsUsernameUsed(www http.ResponseWriter, req *http.Request) + func HandleLogin(www http.ResponseWriter, req *http.Request) + func HandleLogin_v2(www http.ResponseWriter, req *http.Request) + func HandleLogout(www http.ResponseWriter, req *http.Request) + func HandleQRCodeGenerate(www http.ResponseWriter, req *http.Request) + func HandleQRCodeRawGenerate(www http.ResponseWriter, req *http.Request) + func HandleReValidateLogin(www http.ResponseWriter, req *http.Request) + func HandleRecoverPassword_pt1(www http.ResponseWriter, req *http.Request) + func HandleRecoverPassword_pt2(www http.ResponseWriter, req *http.Request) + func HandleRecoverPassword_pt3(www http.ResponseWriter, req *http.Request) + func HandleRegister(www http.ResponseWriter, req *http.Request) + func HandleRegisterDevUnPw(www http.ResponseWriter, req *http.Request) + func HandleRegisterTokenUser(www http.ResponseWriter, req *http.Request) + func HandleStatus(www http.ResponseWriter, req *http.Request) + func HaveCookie(www http.ResponseWriter, req *http.Request, cookieName string) bool + func NewAuthCheckerHandler(handler http.Handler, mux *ymux.ServeMux, out io.Writer, ...) http.Handler + func PgCreateNewAuthTokenForUser(user_id string) (auth_token string, err error) + func PgCreateNewAuthTokenUser(www http.ResponseWriter, req *http.Request, ...) (user_id, raw string, err error) + func PgCreateNewUser(www http.ResponseWriter, req *http.Request, ...) (user_id, email_recovery_token, auth_token, setup_2fa_token, raw, qr_id string, ...) + func PgCreateNewUserDevUnPw(www http.ResponseWriter, req *http.Request, ...) (user_id, raw string, err error) + func PgFinializeUser(user_id string) + func PgGetUser(www http.ResponseWriter, req *http.Request, realm, un, pw string) (userID, auth_token, raw string, err error) + func PgGetUserDevUnPw(www http.ResponseWriter, req *http.Request, realm, un, pw string) (userID, auth_token, raw string, err error) + func PgGetUserFromAuthToken(www http.ResponseWriter, req *http.Request, realm, auth_token, pw string) (userID, un, real_name, emailaddr string, err error) + func PgGetUserFromEmailAddr(www http.ResponseWriter, req *http.Request, email string) (user_id, un, real_name, emailaddr string, err error) + func PgGetUserFromRecoveryToken(www http.ResponseWriter, req *http.Request, realm, token string) (userID, un, real_name, emailaddr string, err error) + func PgUpdateUserPassword(www http.ResponseWriter, req *http.Request, realm, user_id, un, pw string) (err error) + func QRCodeSaveToRedis(qr_id, un, user_id, secret string) + func SetCookie(www http.ResponseWriter, req *http.Request, cookieName, value string, ...) + func SetJsonHdr(www http.ResponseWriter, req *http.Request) + func SetJsonPHdr(www http.ResponseWriter, req *http.Request) + func SetRedisSesionState(key, data string) + func SetSecureCookie(www http.ResponseWriter, req *http.Request, cookieName, value string, ...) + func Setup(gcfg *ymux.BaseConfigType, dbf map[string]bool, f *os.File, base string, ...) + func SetupCall() + func SetupMux(mux *ymux.ServeMux) + func SetupNoDoc(b bool) + func SetupProcCheck() + func Sha1String(s string) []byte + func TestSetLogFilePtr() + func UpdateTOMarkAs2faSetup(user_id, secret string) (err error) + type AuthCheckHandler struct + func (h *AuthCheckHandler) IsAuthRequired(www http.ResponseWriter, req *http.Request) (bool, []string) + func (h *AuthCheckHandler) ServeHTTP(www http.ResponseWriter, req *http.Request) + type CCreateAuthTokenUser struct + Error *CCreateAuthTokenUserError + MapOf map[string]interface{} + Raw string + Status string + Success *CCreateAuthTokenUserSuccess + func CallCCreateAuthTokenUser(plist ...interface{}) (TyRet CCreateAuthTokenUser, err error) + type CCreateAuthTokenUserEnc struct + Error *CCreateAuthTokenUserEncError + MapOf map[string]interface{} + Raw string + Status string + Success *CCreateAuthTokenUserEncSuccess + func CallCCreateAuthTokenUserEnc(plist ...interface{}) (TyRet CCreateAuthTokenUserEnc, err error) + type CCreateAuthTokenUserEncError struct + At string + Code string + Msg string + Status string + StatusCode int + type CCreateAuthTokenUserEncSuccess struct + Auth2FaEnabled string + AuthEmailConfirm string + AuthLoginOnRegister string + AuthToken string + Setup2FaToken string + Status string + UserId string + X2FaId string + type CCreateAuthTokenUserError struct + At string + Code string + Msg string + Status string + StatusCode int + type CCreateAuthTokenUserSuccess struct + Auth2FaEnabled string + AuthEmailConfirm string + AuthLoginOnRegister string + AuthToken string + Setup2FaToken string + Status string + UserId string + X2FaId string + type CCreateDevUnPwUser struct + Error *CCreateDevUnPwUserError + MapOf map[string]interface{} + Raw string + Status string + Success *CCreateDevUnPwUserSuccess + func CallCCreateDevUnPwUser(plist ...interface{}) (TyRet CCreateDevUnPwUser, err error) + type CCreateDevUnPwUserEnc struct + Error *CCreateDevUnPwUserEncError + MapOf map[string]interface{} + Raw string + Status string + Success *CCreateDevUnPwUserEncSuccess + func CallCCreateDevUnPwUserEnc(plist ...interface{}) (TyRet CCreateDevUnPwUserEnc, err error) + type CCreateDevUnPwUserEncError struct + At string + Code string + Msg string + Status string + StatusCode int + type CCreateDevUnPwUserEncSuccess struct + Auth2FaEnabled string + AuthEmailConfirm string + AuthLoginOnRegister string + AuthToken string + Setup2FaToken string + Status string + UserId string + X2FaId string + type CCreateDevUnPwUserError struct + At string + Code string + Msg string + Status string + StatusCode int + type CCreateDevUnPwUserSuccess struct + Auth2FaEnabled string + AuthEmailConfirm string + AuthLoginOnRegister string + AuthToken string + Setup2FaToken string + Status string + UserId string + X2FaId string + type CGetConfig struct + MapOf map[string]interface{} + Raw string + Status string + Success *CGetConfigSuccess + func CallCGetConfig(plist ...interface{}) (TyRet CGetConfig, err error) + type CGetConfigSuccess struct + type CLoginUser struct + Error *CLoginUserError + MapOf map[string]interface{} + Raw string + Status string + Success *CLoginUserSuccess + func CallCLoginUser(plist ...interface{}) (TyRet CLoginUser, err error) + type CLoginUserEnc struct + Error *CLoginUserEncError + MapOf map[string]interface{} + Raw string + Status string + Success *CLoginUserEncSuccess + func CallCLoginUserEnc(plist ...interface{}) (TyRet CLoginUserEnc, err error) + func PgGetUser_v2(www http.ResponseWriter, req *http.Request, realm, un, pw string) (Ty CLoginUserEnc, err error) + type CLoginUserEncError struct + At string + Code string + Msg string + Status string + StatusCode int + type CLoginUserEncSuccess struct + AcctType string + Auth2FaEnabled string + AuthEmailConfirm string + AuthLoginOnRegister string + AuthToken string + Email string + EmailConfirmed string + Pwh string + RFC6238Secret string + RealName string + Salt string + Status string + UserId string + type CLoginUserError struct + At string + Code string + Msg string + Status string + StatusCode int + type CLoginUserSuccess struct + AcctType string + Auth2FaEnabled string + AuthEmailConfirm string + AuthLoginOnRegister string + AuthToken string + Email string + EmailConfirmed string + Pwh string + RFC6238Secret string + RealName string + Salt string + Status string + UserId string + type CRandomString struct + Error *CRandomStringError + MapOf map[string]interface{} + Raw string + Status string + Success *CRandomStringSuccess + func CallCRandomString(plist ...interface{}) (TyRet CRandomString, err error) + type CRandomStringError struct + At string + Code string + Msg string + Status string + StatusCode int + type CRandomStringSuccess struct + RandomValue string + Status string + type CRegisterUser struct + Error *CRegisterUserError + MapOf map[string]interface{} + Raw string + Status string + Success *CRegisterUserSuccess + func CallCRegisterUser(plist ...interface{}) (TyRet CRegisterUser, err error) + type CRegisterUserEnc struct + Error *CRegisterUserEncError + MapOf map[string]interface{} + Raw string + Status string + Success *CRegisterUserEncSuccess + func CallCRegisterUserEnc(plist ...interface{}) (TyRet CRegisterUserEnc, err error) + type CRegisterUserEncError struct + At string + Code string + Msg string + Status string + StatusCode int + type CRegisterUserEncSuccess struct + Auth2FaEnabled string + AuthEmailConfirm string + AuthLoginOnRegister string + AuthToken string + Setup2FaToken string + Status string + UserId string + X2FaId string + type CRegisterUserError struct + At string + Code string + Msg string + Status string + StatusCode int + type CRegisterUserSuccess struct + Auth2FaEnabled string + AuthEmailConfirm string + AuthLoginOnRegister string + AuthToken string + Setup2FaToken string + Status string + UserId string + X2FaId string + type CSetup2FaTables struct + Error *CSetup2FaTablesError + MapOf map[string]interface{} + Raw string + Status string + Success *CSetup2FaTablesSuccess + func CallCSetup2FaTables(plist ...interface{}) (TyRet CSetup2FaTables, err error) + type CSetup2FaTablesError struct + At string + Code string + Msg string + Status string + StatusCode int + type CSetup2FaTablesSuccess struct + Status string + type CValidate2FaPin struct + Error *CValidate2FaPinError + MapOf map[string]interface{} + Raw string + Status string + Success *CValidate2FaPinSuccess + func CallCValidate2FaPin(plist ...interface{}) (TyRet CValidate2FaPin, err error) + type CValidate2FaPinEnc struct + Error *CValidate2FaPinEncError + MapOf map[string]interface{} + Raw string + Status string + Success *CValidate2FaPinEncSuccess + func CallCValidate2FaPinEnc(plist ...interface{}) (TyRet CValidate2FaPinEnc, err error) + type CValidate2FaPinEncError struct + At string + Code string + Msg string + Status string + StatusCode int + type CValidate2FaPinEncSuccess struct + Auth2FaEnabled string + AuthEmailConfirm string + AuthLoginOnRegister string + AuthToken string + FoundOtk string + Secret string + Status string + UserId string + type CValidate2FaPinError struct + At string + Code string + Msg string + Status string + StatusCode int + type CValidate2FaPinSuccess struct + Auth2FaEnabled string + AuthEmailConfirm string + AuthLoginOnRegister string + AuthToken string + FoundOtk string + Secret string + Status string + UserId string + type QRData struct + QRUrl string + Secret string + UserID string + Username string + func QRCodeGetFromRedis(qr_id string) (rv QRData) + type SCheckPriv struct + Error *SCheckPrivError + MapOf map[string]interface{} + Raw string + Status string + Success *SCheckPrivSuccess + func CallSCheckPriv(plist ...interface{}) (TyRet SCheckPriv, err error) + type SCheckPrivError struct + At string + Code string + Msg string + Status string + StatusCode int + type SCheckPrivSuccess struct + HasPiv string + Status string