openedx.core.djangoapps.oauth_dispatch.management.commands package#
Submodules#
openedx.core.djangoapps.oauth_dispatch.management.commands.create_dot_application module#
Management command for creating a Django OAuth Toolkit Application model.
Also creates an oauth_dispatch application access if scopes are provided.
- class openedx.core.djangoapps.oauth_dispatch.management.commands.create_dot_application.Command(stdout=None, stderr=None, no_color=False, force_color=False)#
Bases:
BaseCommandCreates a Django OAuth Toolkit (DOT) Application Instance.
- add_arguments(parser)#
Entry point for subclassed commands to add custom arguments.
- handle(*args, **options)#
The actual logic of the command. Subclasses must implement this method.
- help = 'Creates a Django OAuth Toolkit (DOT) Application Instance.'#
openedx.core.djangoapps.oauth_dispatch.management.commands.edx_clear_expired_tokens module#
Management command for clear expired access tokens!
- class openedx.core.djangoapps.oauth_dispatch.management.commands.edx_clear_expired_tokens.Command(stdout=None, stderr=None, no_color=False, force_color=False)#
Bases:
BaseCommand- add_arguments(parser)#
Entry point for subclassed commands to add custom arguments.
- clear_table_data(query_set, batch_size, model, sleep_time)#
- get_expiration_time(now)#
- handle(*args, **options)#
The actual logic of the command. Subclasses must implement this method.
- help = 'Clear expired access tokens and refresh tokens for Django OAuth Toolkit'#
openedx.core.djangoapps.oauth_dispatch.management.commands.generate_jwt_signing_key module#
Management command for generating an asymmetric keypair to sign JSON Web Tokens.
- class openedx.core.djangoapps.oauth_dispatch.management.commands.generate_jwt_signing_key.Command(stdout=None, stderr=None, no_color=False, force_color=False)#
Bases:
BaseCommandGenerates an asymmetric keypair to sign JSON Web Tokens.
- add_arguments(parser)#
Entry point for subclassed commands to add custom arguments.
- create_parser(*args, **kwargs)#
Create and return the
ArgumentParserwhich will be used to parse the arguments to this command.
- handle(*args, **options)#
The actual logic of the command. Subclasses must implement this method.
- help = '\n Generates an asymmetric keypair to sign JSON Web Tokens. Outputs the\n generated public and private keys in YAML format as required by Open edX\n configuration settings.\n\n This same command can be used over time to rotate keys. Simply rerun this\n command and public keys configured in the past will be automatically\n included in the JWK keyset in the YAML output (unless the option\n not-add-previous-public-keys is provided).\n\n New keys are identified by a "kid" value that is automatically generated of\n length \'key-id-size\' (unless you explicitly provide a "kid" of your own via\n the \'key-id\' option).\n\n See https://github.com/openedx/edx-platform/blob/master/openedx/core/djangoapps/oauth_dispatch/docs/decisions/0008-use-asymmetric-jwts.rst\n '#