Documentation
¶
Index ¶
- type Connection
- type LicenseHolders
- type LicenseMsg
- type NewApplicationMsg
- type NewLicenseMsg
- type Route
- type Server
- func (s *Server) Bind()
- func (s *Server) Clean() error
- func (s *Server) ClientHello(conn *fastws.Conn) error
- func (s *Server) CreateApplication(c fiber.Ctx) error
- func (s *Server) CreateLicense(c fiber.Ctx) error
- func (s *Server) DefaultOptions()
- func (s *Server) EncryptJson(c fiber.Ctx, plainText any, session *Session) error
- func (s *Server) ErrorHandler(c fiber.Ctx, errResp error) error
- func (s *Server) GenerateKeyPair(username string, admin int8) (*fiber.Map, error)
- func (s *Server) IntegrityMiddleware(c fiber.Ctx, body []byte) error
- func (s *Server) Login(c fiber.Ctx) error
- func (s *Server) Logout(c fiber.Ctx) error
- func (s *Server) NewOwner(c fiber.Ctx) error
- func (s *Server) ParseBody(c fiber.Ctx) (*Session, []byte, error)
- func (s *Server) RefreshAccessToken(c fiber.Ctx) error
- func (s *Server) Register(c fiber.Ctx) error
- func (s *Server) ServeHello(conn *fastws.Conn)
- func (s *Server) ServerOptions(e ...fiber.Handler)
- func (s *Server) Start(port string) error
- func (s *Server) VerifyLicense(c fiber.Ctx) error
- type Session
- type SterlizedSession
- type UserJWT
- type UserMsg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
func (*Connection) SendFinalAck ¶
func (c *Connection) SendFinalAck(sessionID string, hmacSeed int64) error
func (*Connection) SendHello ¶
func (c *Connection) SendHello(payload []byte) error
type LicenseHolders ¶
type LicenseHolders struct {
// contains filtered or unexported fields
}
type LicenseMsg ¶
type NewApplicationMsg ¶
type NewLicenseMsg ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) ClientHello ¶
ClientHello preforms a DHE and registers a new session if successful.
func (*Server) CreateApplication ¶
CreateApplication creates a new application and dumps it in the database ! Most of these endpoints don't need to be encrypted. * If it's ever going to be used in production, it's probably a good idea to remove the encryption.
func (*Server) CreateLicense ¶
CreateLicense creates a new license and dumps it in the database
func (*Server) DefaultOptions ¶
func (s *Server) DefaultOptions()
func (*Server) EncryptJson ¶
func (*Server) GenerateKeyPair ¶
func (*Server) IntegrityMiddleware ¶
func (*Server) ServeHello ¶
func (*Server) ServerOptions ¶
func (*Server) VerifyLicense ¶
VerifyLicense will verify the license against the database. We use Session based authentication instead of JWT because this should be treated as a one-time-use token. There will be no need to do anything after this process. If you would like to verify a license another time, it is much more secure to just create another session instead.