usrbinsam / jwt-key-server Goto Github PK
View Code? Open in Web Editor NEWJWT based remote licensing server.
License: MIT License
JWT based remote licensing server.
License: MIT License
I used 127.0.0.0:5001 through the nginx proxy, however at the dashboard I didn't get the client IP, despite having foward the IP and existed the remote client IP from the nginx log.
My config:
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Graylog-Server-URL https://$server_name/;
proxy_pass http://127.0.0.1:5001/;
Also I want to add expiration date information field, please guide me.
Hey there,
While creating a new user with flask I am facing this error -
(venv) C:\Users\admin\Desktop\mini-key-server-master>flask create-user username password
Traceback (most recent call last):
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\engine\base.py", line 2262, in _wrap_pool_connect
return fn()
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\pool\base.py", line 363, in connect
return _ConnectionFairy._checkout(self)
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\pool\base.py", line 760, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\pool\base.py", line 492, in checkout
rec = pool._do_get()
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\pool\impl.py", line 139, in _do_get
self._dec_overflow()
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\util\langhelpers.py", line 68, in exit
compat.reraise(exc_type, exc_value, exc_tb)
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\util\compat.py", line 154, in reraise
raise value
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\pool\impl.py", line 136, in _do_get
return self._create_connection()
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\pool\base.py", line 308, in _create_connection
return _ConnectionRecord(self)
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\pool\base.py", line 437, in init
self.__connect(first_connect_check=True)
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\pool\base.py", line 639, in __connect
connection = pool.invoke_creator(self)
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\engine\strategies.py", line 114, in connect
return dialect.connect(*cargs, **cparams)
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\engine\default.py", line 451, in connect
return self.dbapi.connect(*cargs, **cparams)
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\psycopg2_init.py", line 126, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: fe_sendauth: no password supplied
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\admin\Anaconda3\Lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\admin\Anaconda3\Lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\admin\Desktop\mini-key-server-master\venv\Scripts\flask.exe_main.py", line 7, in
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\flask\cli.py", line 966, in main
cli.main(prog_name="python -m flask" if as_module else None)
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\flask\cli.py", line 586, in main
return super(FlaskGroup, self).main(*args, **kwargs)
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\click\core.py", line 717, in main
rv = self.invoke(ctx)
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\click\core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\click\core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\click\core.py", line 555, in invoke
return callback(*args, **kwargs)
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\click\decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\flask\cli.py", line 426, in decorator
return _ctx.invoke(f, *args, **kwargs)
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\click\core.py", line 555, in invoke
return callback(*args, **kwargs)
File "C:\Users\admin\Desktop\mini-key-server-master\keyserv_init.py", line 71, in create_user_command
add_user(username, password.encode())
File "C:\Users\admin\Desktop\mini-key-server-master\keyserv\auth.py", line 37, in add_user
db.session.commit()
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\orm\scoping.py", line 162, in do
return getattr(self.registry(), name)(*args, **kwargs)
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\orm\session.py", line 1027, in commit
self.transaction.commit()
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\orm\session.py", line 494, in commit
self._prepare_impl()
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\orm\session.py", line 473, in _prepare_impl
self.session.flush()
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\orm\session.py", line 2459, in flush
self._flush(objects)
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\orm\session.py", line 2597, in _flush
transaction.rollback(_capture_exception=True)
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\util\langhelpers.py", line 68, in exit
compat.reraise(exc_type, exc_value, exc_tb)
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\util\compat.py", line 154, in reraise
raise value
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\orm\session.py", line 2557, in _flush
flush_context.execute()
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\orm\unitofwork.py", line 422, in execute
rec.execute(self)
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\orm\unitofwork.py", line 589, in execute
uow,
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\orm\persistence.py", line 213, in save_obj
) in _organize_states_for_save(base_mapper, states, uowtransaction):
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\orm\persistence.py", line 374, in _organize_states_for_save
base_mapper, uowtransaction, states
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\orm\persistence.py", line 1605, in _connections_for_states
connection = uowtransaction.transaction.connection(base_mapper)
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\orm\session.py", line 313, in connection
return self._connection_for_bind(bind, execution_options)
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\orm\session.py", line 419, in _connection_for_bind
conn = self._parent._connection_for_bind(bind, execution_options)
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\orm\session.py", line 431, in _connection_for_bind
conn = bind._contextual_connect()
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\engine\base.py", line 2226, in _contextual_connect
self._wrap_pool_connect(self.pool.connect, None),
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\engine\base.py", line 2266, in _wrap_pool_connect
e, dialect, self
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\engine\base.py", line 1536, in _handle_dbapi_exception_noconnection
util.raise_from_cause(sqlalchemy_exception, exc_info)
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\util\compat.py", line 399, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\util\compat.py", line 153, in reraise
raise value.with_traceback(tb)
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\engine\base.py", line 2262, in _wrap_pool_connect
return fn()
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\pool\base.py", line 363, in connect
return _ConnectionFairy._checkout(self)
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\pool\base.py", line 760, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\pool\base.py", line 492, in checkout
rec = pool._do_get()
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\pool\impl.py", line 139, in _do_get
self._dec_overflow()
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\util\langhelpers.py", line 68, in exit
compat.reraise(exc_type, exc_value, exc_tb)
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\util\compat.py", line 154, in reraise
raise value
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\pool\impl.py", line 136, in _do_get
return self._create_connection()
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\pool\base.py", line 308, in _create_connection
return _ConnectionRecord(self)
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\pool\base.py", line 437, in init
self.__connect(first_connect_check=True)
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\pool\base.py", line 639, in __connect
connection = pool.invoke_creator(self)
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\engine\strategies.py", line 114, in connect
return dialect.connect(*cargs, **cparams)
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\sqlalchemy\engine\default.py", line 451, in connect
return self.dbapi.connect(*cargs, **cparams)
File "c:\users\admin\desktop\mini-key-server-master\venv\lib\site-packages\psycopg2_init.py", line 126, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) fe_sendauth: no password supplied
(Background on this error at: http://sqlalche.me/e/e3q8)
How do I fix this?
Hello,
I have a question, how to delete a token that has not been used for a long time, how to add a delete button to it.
thx
Hello, I'm having the same issue and creating a user "keyserver" and trying several URIs doesn't solve it, could you help me?
To create a user I've tried "flask create-user username password" and "flask create-user keyserver password"
In the config.py I've tried SQLALCHEMY_DATABASE_URI = "postgres://localhost/keyserver", SQLALCHEMY_DATABASE_URI = "postgres://keyserver@localhost", SQLALCHEMY_DATABASE_URI = "postgres://username:password@localhost"
Originally posted by @jeann3 in #8 (comment)
It would be great to see a number of licenses that are currently in use. Im not sure if this could be done by simply parsing the audit log and looking for unique license keys that have checked in in the last 24 hours or something?
I have a project I think im going to use this for, and while the project is free, I mainly want to track the number of unique installs currently in use.
It would be great if there was some simple usage documentation for this project. At the moment, it's not super clear what is supported or how I might go about integrating this elsewhere. A few code samples (in any language) would be wonderful :)
Hey there,
I got this all working but I would like to see if you could clarify something for me. I see that in the modification menu there is an "Active" setting, but it is not shown on the keys information display screen. What I am wondering is, is it possible to use that "Active" setting to manage something similar to a subscription service in that I would not care about how many activations there were or were used, but having the application have a license key and have it check in with the server now and then to make sure the subscription is still activated. If it is not activated then I would have it disable features in my application.
I was just wondering if you happen to know off hand if the Active setting might be able to be used for that, if not, would it be possible to get a small feature like that added in? Just a periodic check and way to cut a license from being valid anymore.
Thanks
-MH
Hello, I'm very interested in this project. One problem I found is that there is a "from keyserv. Models import DB" without this keyserv. It's not in the catalog either. I don't know how to deal with it. I would appreciate your guidance.
at auth.py
#=============================
import secrets
import argon2
from flask_login import LoginManager, UserMixin
from keyserv.models import db
login_manager = LoginManager()
login_manager.session_protection = "strong"
#=================================
Traceback (most recent call last):
File "D:\project381\flask02\venv\lib\site-packages\flask\cli.py", line 240, in locate_app
import(module_name)
File "D:\project381\flask02_init_.py", line 27, in
from .auth import login_manager, add_user
File "D:\project381\flask02\auth.py", line 27, in
from keyserv.models import db
ModuleNotFoundError: No module named 'keyserv'
An error was ocurred during the creation of user
#> export FLASK_APP=keyserver.py
#> flask create-user test test
The error messages show that table users do not exist.
File "/home/benzene/src/mini-key-server/venv/lib/python3.6/site-packages/sqlalchemy/orm/persistence.py", line 1138, in _emit_insert_statements
statement, params
File "/home/benzene/src/mini-key-server/venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 988, in execute
return meth(self, multiparams, params)
File "/home/benzene/src/mini-key-server/venv/lib/python3.6/site-packages/sqlalchemy/sql/elements.py", line 287, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "/home/benzene/src/mini-key-server/venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1107, in _execute_clauseelement
distilled_params,
File "/home/benzene/src/mini-key-server/venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1248, in _execute_context
e, statement, parameters, cursor, context
File "/home/benzene/src/mini-key-server/venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1466, in _handle_dbapi_exception
util.raise_from_cause(sqlalchemy_exception, exc_info)
File "/home/benzene/src/mini-key-server/venv/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 399, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File "/home/benzene/src/mini-key-server/venv/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 153, in reraise
raise value.with_traceback(tb)
File "/home/benzene/src/mini-key-server/venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1244, in _execute_context
cursor, statement, parameters, context
File "/home/benzene/src/mini-key-server/venv/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 550, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable) relation "users" does not exist
LINE 1: INSERT INTO users (username, passwd, level) VALUES ('test', ...
^
[SQL: INSERT INTO users (username, passwd, level) VALUES (%(username)s, %(passwd)s, %(level)s) RETURNING users.id]
[parameters: {'username': 'test', 'passwd': <psycopg2.extensions.Binary object at 0x7fd8d4fa6e40>, 'level': 500}]
Hey there,
I went to try this out and I got up to the point of issuing the flask create_user command but it comes back saying :
sqlalchemy.exc.ProgrammingError: (psycopg2.ProgrammingError) relation "users" does not exist
LINE 1: INSERT INTO users (username, passwd, level) VALUES
Was it supposed to auto create the tables? It doesn't seem like it is.
EDIT --- I looked through the code and saw there was an initdb command, so I did flask initdb, it looks like things are ok now.
Traceback (most recent call last): File "/root/venv/bin/flask", line 8, in <module> sys.exit(main()) File "/root/venv/local/lib/python2.7/site-packages/flask/cli.py", line 967, in main cli.main(args=sys.argv[1:], prog_name="python -m flask" if as_module else None) File "/root/venv/local/lib/python2.7/site-packages/flask/cli.py", line 586, in main return super(FlaskGroup, self).main(*args, **kwargs) File "/root/venv/local/lib/python2.7/site-packages/click/core.py", line 782, in main rv = self.invoke(ctx) File "/root/venv/local/lib/python2.7/site-packages/click/core.py", line 1254, in invoke cmd_name, cmd, args = self.resolve_command(ctx, args) File "/root/venv/local/lib/python2.7/site-packages/click/core.py", line 1297, in resolve_command cmd = self.get_command(ctx, cmd_name) File "/root/venv/local/lib/python2.7/site-packages/flask/cli.py", line 542, in get_command rv = info.load_app().cli.get_command(ctx, name) File "/root/venv/local/lib/python2.7/site-packages/flask/cli.py", line 388, in load_app app = locate_app(self, import_name, name) File "/root/venv/local/lib/python2.7/site-packages/flask/cli.py", line 240, in locate_app __import__(module_name) File "/var/www/vhosts/zubarion2.de/crm.zubarion-sharing.de/mini-key-server/keyserver.py", line 3, in <module> from keyserv import create_app File "/var/www/vhosts/zubarion2.de/crm.zubarion-sharing.de/mini-key-server/keyserv/__init__.py", line 70 def create_user_command(username: str, password: str): ^ SyntaxError: invalid syntax
This is my output of the error.
Not sure if this is intentional or not, but the validation seems borked
After activating the the token (specifying a machine and user), neither are used in the validation (check) steps, thus it is possible for user paul to "steal" user sam's token, and still have activated software. Additionally, the software can be installed on multiple machines (with different machine names) and still return as license ok
A quick way to resolve this might be to have the activations stored in the db, and verified agains an active user (by using a foreign key or many-many to the users table), and having the api/check validate it against this table
HTH
Entered : flask create-user username password
and received below error messages ..
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/reezalaq/Documents/mini-key-server-master/venv/bin/flask", line 11, in
sys.exit(main())
File "/Users/reezalaq/Documents/mini-key-server-master/venv/lib/python3.6/site-packages/flask/cli.py", line 894, in main
cli.main(args=args, prog_name=name)
File "/Users/reezalaq/Documents/mini-key-server-master/venv/lib/python3.6/site-packages/flask/cli.py", line 557, in main
return super(FlaskGroup, self).main(*args, **kwargs)
File "/Users/reezalaq/Documents/mini-key-server-master/venv/lib/python3.6/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/Users/reezalaq/Documents/mini-key-server-master/venv/lib/python3.6/site-packages/click/core.py", line 1061, in invoke
cmd_name, cmd, args = self.resolve_command(ctx, args)
File "/Users/reezalaq/Documents/mini-key-server-master/venv/lib/python3.6/site-packages/click/core.py", line 1100, in resolve_command
cmd = self.get_command(ctx, cmd_name)
File "/Users/reezalaq/Documents/mini-key-server-master/venv/lib/python3.6/site-packages/flask/cli.py", line 515, in get_command
rv = info.load_app().cli.get_command(ctx, name)
File "/Users/reezalaq/Documents/mini-key-server-master/venv/lib/python3.6/site-packages/flask/cli.py", line 372, in load_app
app = locate_app(self, import_name, name)
File "/Users/reezalaq/Documents/mini-key-server-master/venv/lib/python3.6/site-packages/flask/cli.py", line 254, in locate_app
return find_best_app(script_info, module)
File "/Users/reezalaq/Documents/mini-key-server-master/venv/lib/python3.6/site-packages/flask/cli.py", line 76, in find_best_app
app = call_factory(script_info, app_factory)
File "/Users/reezalaq/Documents/mini-key-server-master/venv/lib/python3.6/site-packages/flask/cli.py", line 114, in call_factory
return app_factory(script_info)
File "/Users/reezalaq/Documents/mini-key-server-master/keyserv/init.py", line 51, in create_app
app.config.from_object("keyserv.config.{}".format(config))
File "/Users/reezalaq/Documents/mini-key-server-master/venv/lib/python3.6/site-packages/flask/config.py", line 170, in from_object
obj = import_string(obj)
File "/Users/reezalaq/Documents/mini-key-server-master/venv/lib/python3.6/site-packages/werkzeug/utils.py", line 443, in import_string
sys.exc_info()[2])
File "/Users/reezalaq/Documents/mini-key-server-master/venv/lib/python3.6/site-packages/werkzeug/_compat.py", line 137, in reraise
raise value.with_traceback(tb)
File "/Users/reezalaq/Documents/mini-key-server-master/venv/lib/python3.6/site-packages/werkzeug/utils.py", line 431, in import_string
module = import_string(module_name)
File "/Users/reezalaq/Documents/mini-key-server-master/venv/lib/python3.6/site-packages/werkzeug/utils.py", line 443, in import_string
sys.exc_info()[2])
File "/Users/reezalaq/Documents/mini-key-server-master/venv/lib/python3.6/site-packages/werkzeug/_compat.py", line 137, in reraise
raise value.with_traceback(tb)
File "/Users/reezalaq/Documents/mini-key-server-master/venv/lib/python3.6/site-packages/werkzeug/utils.py", line 431, in import_string
module = import_string(module_name)
File "/Users/reezalaq/Documents/mini-key-server-master/venv/lib/python3.6/site-packages/werkzeug/utils.py", line 443, in import_string
sys.exc_info()[2])
File "/Users/reezalaq/Documents/mini-key-server-master/venv/lib/python3.6/site-packages/werkzeug/_compat.py", line 137, in reraise
raise value.with_traceback(tb)
File "/Users/reezalaq/Documents/mini-key-server-master/venv/lib/python3.6/site-packages/werkzeug/utils.py", line 436, in import_string
raise ImportError(e)
werkzeug.utils.ImportStringError: import_string() failed for 'keyserv.config.<flask.cli.ScriptInfo object at 0x10fdc7d30>'. Possible reasons are:
Debugged import:
Original exception:
ImportStringError: import_string() failed for 'keyserv.config.<flask.cli'. Possible reasons are:
Debugged import:
Original exception:
ImportStringError: import_string() failed for 'keyserv.config.<flask'. Possible reasons are:
Debugged import:
Original exception:
ImportError: module 'keyserv.config' has no attribute '<flask' @miniCruzer
Hey there,
Since I kept adding to my previous post I thought it might be best to split it up as some of the things were not related anymore.
Features request 1
The application I have been making I am not even sure if I am going to actually release, I am primarily just trying to learn as much as I can in every aspect of software development, but I definitely want to follow through to the end with it to be as close to production-ready as I can. That being said, if I were to release it, it would come with the software being in "demo mode" if no key was present, it has a config file in which the user would then input their own key once they received it by purchasing a subscription on the site. Because of that, I am wondering if it might be possible / a good idea that when the server side confirm the token, perhaps if the server side also stored a username and an email field which would be tied to a key and on the application side, the user was asked to input their key as well as the user and email used for creation of the key, it might discourage key sharing?
My overall vision is to have a user create an account on my site, purchase their license from my web store, my store will then create the license key automatically and tie that key to the account in which it was created. So then the key is also tied to a transaction id and invoice/order number that the customer receives.
On my own end perhaps upon initial activation of a key, I could somehow trigger that to send a verification email to the email used to create the account and that is tied to the key to verify that the person activating the key is in fact the person attempting to use the key and it would not allow for the initial activation until a response is received from that email verification. Then maybe the MAC address could be recorded and stored and checked against upon startup each time to ensure it's the same machine each time. If MAC != it could reply with a message to contact support to verify that the person trying to activate is the correct person via the invoice/order number they received.
Feature request 2
Single application but with multiple possible features / unlocks. Example the primary application being App1, but App1 might eventually get an update to now be:
App1 |___
| SubFeature1 - Comes with base application
| SubFeature2 - Requires upgrade
Upon thinking about it, it seems like there might be at least two decent ways to go about it. If there is already Key1 which is assigned to App1, perhaps SubFeatures could be added to App1 as checkboxes. Say App1 gets downloaded, without a key App1 is in a demo/lite mode. Customer1 purchases a subscription license for App1 which enables Feature1. Down the line, customer might decide they also want Feature2 for App 1. Ideally when the customer upgrades App1 to Feature2, The store could go into the DB and simply turn on Feature2 for the customer, so then next time they open it, when it checks the license is would then see that Feature2 is now activated as well and then internally it just turns on the functionality for Feature2.
That would of course then require the response to be more than just a response 201. So then I suppose that another idea which might work would be an encrypted license.dat file which contains their base App1 key, then when they purchase Feature2 it generates a new License.dat which now contains 2 keys, one for App1-Feature1, and Feature2 and they just swap out their old License.dat for the new one and then I suppose internally it could verify key1 first then send a second request for key2. It's possible but I am not sure if it is a good idea, the license.dat file could also contain the username and email of the purchaser, but it may be better to not include that and upon starting the application it would ask for them to be manually input before it does the verification, so that if the person just has the license but doesn't know the email, they can't even put it in to get to the next step, which could be the email verification that they have to click before inial activation from feature1.
I wanted to see if you had any thoughts on this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.