Versions in this module Expand all Collapse all v0 v0.0.3 Jul 27, 2021 Changes in this version + const ListeningSSLPortNumber + const NumberOfSSLThreads + var SecureConnectionMsg []byte = []byte("{\"success\": true, \"message\": \"SECURED!\"}") + var SecureConnectionMsgLen int = len([]byte("{\"success\": true, \"message\": \"SECURED!\"}")) + func TestHelperGenSig(token *[]byte, content string, counter int) string v0.0.2 Jun 13, 2021 Changes in this version + const AuthIDAtomicCounter + const AuthIDSetPrefix + const AuthIDSetTokenField + const AuthIDSetTokenStaleDateTimeField + const AuthIDSetTokenUseCounter + const AuthIDSetUsernameField + const CommandBytes + const CrtLocation + const HttpHost + const HttpPort + const IoDeadline + const KeyLocation + const ListeningTCPIpAddress + const ListeningTCPPortNumber + const NumberOfTCPThreads + const ShutdownDuration + const SuperUserID + const TokenLength + const TokenStaleTime + const UserAuthIDTable + const UserPassTable + var MalformedDataMsg []byte = []byte("{\"success\": false, \"error\": \"Data Was Malformed!\"}") + var MalformedDataMsgLen int = len([]byte("{\"success\": false, \"error\": \"Data Was Malformed!\"}")) + func ConstructNewToken(authID string) ([]byte, time.Time, error) + func CreateAccount(username string, password string) (bool, error) + func GetUser(header policy.RequestHeader, bodyFactories policy.RequestBodyFactories, ...) policy.CommandResponse + func IsValidLogin(username string, password string) bool + func Login(header policy.RequestHeader, bodyFactories policy.RequestBodyFactories, ...) policy.CommandResponse + func NeedsSecurity(cmd policy.ClientCmd) bool + func ParseCommand(mostSignificant byte, leastSignificant byte) (policy.ClientCmd, error) + func Register(header policy.RequestHeader, bodyFactories policy.RequestBodyFactories, ...) policy.CommandResponse + func SecureTCPConnIfNeeded(clientConn *TCPClientConn, prefix TCPRequestPrefix) (bool, error) + func SigVerification(userID string, signature string, content *[]byte) error + func StartEncryption() (func(), error) + func StartListener() (func(), error) + type GetUserCommandBody struct + Username string + type LoginCommandBody struct + Password string + Username string + type RegisterCommandBody struct + Password string + Username string + type SuperUserRequest struct + BodyFactories policy.RequestBodyFactories + Header policy.RequestHeader + IsSecureConnection bool + func RequestWithSuperUser(isTask bool, cmd policy.ClientCmd, args interface{}) (SuperUserRequest, error) + type TCPClientConn struct + type TCPRequestPrefix struct + IsBase64Enc bool + IsJSON bool + NeedsSecurity bool + type UserInfo struct + AuthID string + Username string