mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 18:31:13 -05:00
Add external API for sending SMS to openapi
This commit is contained in:
@@ -754,3 +754,13 @@ def create_admin_jwt():
|
||||
current_app.logger.error('Can only be run in development')
|
||||
return
|
||||
print(create_jwt_token(current_app.config['SECRET_KEY'], current_app.config['ADMIN_CLIENT_ID']))
|
||||
|
||||
@notify_command(name='create-user-jwt')
|
||||
@click.option('-t', '--token', required=True, prompt=False)
|
||||
def create_user_jwt(token):
|
||||
if getenv('NOTIFY_ENVIRONMENT', '') != 'development':
|
||||
current_app.logger.error('Can only be run in development')
|
||||
return
|
||||
service_id = token[-73:-37]
|
||||
api_key = token[-36:]
|
||||
print(create_jwt_token(api_key, service_id))
|
||||
|
||||
Reference in New Issue
Block a user