# Generated by Django 2.2.28 on 2022-05-25 10:26

import django.contrib.postgres.fields
import django.db.models.deletion
from django.db import migrations, models

import authentic2_auth_fc.models


class Migration(migrations.Migration):
    dependencies = [
        ('authenticators', '0003_auto_20220413_1504'),
        ('authentic2_auth_fc', '0004_fcaccount_order2'),
    ]

    operations = [
        migrations.CreateModel(
            name='FcAuthenticator',
            fields=[
                (
                    'baseauthenticator_ptr',
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to='authenticators.BaseAuthenticator',
                    ),
                ),
                (
                    'platform',
                    models.CharField(
                        choices=[('prod', 'Production'), ('test', 'Integration')],
                        default='test',
                        max_length=4,
                        verbose_name='Platform',
                    ),
                ),
                (
                    'client_id',
                    models.CharField(
                        help_text=(
                            'See <a href="https://partenaires.franceconnect.gouv.fr/fcp/fournisseur-service">'
                            'FranceConnect partners site</a> for getting client ID and secret.'
                        ),
                        max_length=256,
                        verbose_name='Client ID',
                    ),
                ),
                ('client_secret', models.CharField(max_length=256, verbose_name='Client Secret')),
                (
                    'scopes',
                    django.contrib.postgres.fields.ArrayField(
                        base_field=models.CharField(
                            choices=[
                                ('given_name', 'given name (given_name)'),
                                ('gender', 'gender (gender)'),
                                ('birthdate', 'birthdate (birthdate)'),
                                ('birthcountry', 'birthcountry (birthcountry)'),
                                ('birthplace', 'birthplace (birthplace)'),
                                ('family_name', 'family name (family_name)'),
                                ('email', 'email (email)'),
                                ('preferred_username', 'usual family name (preferred_username)'),
                                ('identite_pivot', 'core id (identite_pivot)'),
                                ('profile', 'profile (profile)'),
                                ('birth', 'birth profile (birth)'),
                            ],
                            max_length=32,
                        ),
                        default=authentic2_auth_fc.models.get_default_scopes,
                        size=None,
                        verbose_name='Scopes',
                    ),
                ),
            ],
            options={
                'verbose_name': 'FranceConnect',
            },
            bases=('authenticators.baseauthenticator',),
        ),
    ]
