mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-04-24 03:45:38 +08:00
rework signin so as to authorize an externally-given public key
This commit is contained in:
@@ -50,7 +50,7 @@ from .schemas import *
|
||||
from keys import HDWallet, get_pubkey_hex
|
||||
|
||||
|
||||
def app_make_session( app_domain, methods, app_public_key, master_data_privkey_hex, app_user_id=None, session_lifetime=None, blockchain_ids=None, config_path=CONFIG_PATH ):
|
||||
def app_make_session( app_public_key, app_domain, methods, master_data_privkey, app_user_id=None, session_lifetime=None, blockchain_ids=None, config_path=CONFIG_PATH ):
|
||||
"""
|
||||
Make a session JWT for this application.
|
||||
Verify with user private key
|
||||
@@ -81,7 +81,7 @@ def app_make_session( app_domain, methods, app_public_key, master_data_privkey_h
|
||||
jsonschema.validate(ses, APP_SESSION_SCHEMA)
|
||||
|
||||
signer = jsontokens.TokenSigner()
|
||||
session_token = signer.sign( ses, master_data_privkey_hex )
|
||||
session_token = signer.sign( ses, master_data_privkey )
|
||||
session = jsontokens.decode_token(session_token)
|
||||
|
||||
return {'session': session, 'session_token': session_token}
|
||||
|
||||
Reference in New Issue
Block a user