authentik.providers.oauth2.migrations.0030_oauth2provider_refresh_token_threshold
1# Generated by Django 5.1.12 on 2025-09-25 15:26 2 3import authentik.lib.utils.time 4from django.db import migrations, models 5 6 7class Migration(migrations.Migration): 8 9 dependencies = [ 10 ("authentik_providers_oauth2", "0029_oauth2provider__backchannel_logout_uris"), 11 ] 12 13 operations = [ 14 migrations.AddField( 15 model_name="oauth2provider", 16 name="refresh_token_threshold", 17 field=models.TextField( 18 default="seconds=0", 19 help_text="When refreshing a token, if the refresh token is valid for less than this duration, it will be renewed. When set to seconds=0, token will always be renewed. (Format: hours=1;minutes=2;seconds=3).", 20 validators=[authentik.lib.utils.time.timedelta_string_validator], 21 ), 22 ), 23 ]
class
Migration(django.db.migrations.migration.Migration):
8class Migration(migrations.Migration): 9 10 dependencies = [ 11 ("authentik_providers_oauth2", "0029_oauth2provider__backchannel_logout_uris"), 12 ] 13 14 operations = [ 15 migrations.AddField( 16 model_name="oauth2provider", 17 name="refresh_token_threshold", 18 field=models.TextField( 19 default="seconds=0", 20 help_text="When refreshing a token, if the refresh token is valid for less than this duration, it will be renewed. When set to seconds=0, token will always be renewed. (Format: hours=1;minutes=2;seconds=3).", 21 validators=[authentik.lib.utils.time.timedelta_string_validator], 22 ), 23 ), 24 ]
The base class for all migrations.
Migration files will import this from django.db.migrations.Migration and subclass it as a class called Migration. It will have one or more of the following attributes:
- operations: A list of Operation instances, probably from django.db.migrations.operations
- dependencies: A list of tuples of (app_path, migration_name)
- run_before: A list of tuples of (app_path, migration_name)
- replaces: A list of migration_names
Note that all migrations come out of migrations and into the Loader or Graph as instances, having been initialized with their app label and name.