# Generated by Django 4.2.23 on 2025-09-17 21:53

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="LoginGovSPSettings",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "sandbox_mode",
                    models.BooleanField(
                        default=True, help_text="Enable sandbox mode (default: True)"
                    ),
                ),
                (
                    "client_id",
                    models.CharField(
                        default=None,
                        help_text='Client ID for Login.gov. In the Login.gov dashboard, this is called "Issuer" and will have the form '
                        "<b>urn:gov:gsa:openidconnect.profiles:sp:sso:<i>agency_name</i>:<i>app_name</i></b>",
                        max_length=255,
                    ),
                ),
                (
                    "auto_create_users",
                    models.BooleanField(
                        default=True,
                        help_text="Automatically create new Django users when logging in via Login.gov",
                    ),
                ),
                (
                    "auto_link_users",
                    models.BooleanField(
                        default=True,
                        help_text="Automatically link existing Django users when logging in via Login.gov",
                    ),
                ),
                (
                    "default_group",
                    models.ForeignKey(
                        blank=True,
                        help_text="Default group for new or linked users",
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to="auth.group",
                    ),
                ),
                (
                    "oidc_autoconfig",
                    models.JSONField(
                        blank=True,
                        help_text="OIDC auto configuration as JSON blob",
                        null=True,
                    ),
                ),
                ("updated_at", models.DateTimeField(auto_now=True)),
            ],
        ),
    ]
