# -*- coding: utf-8 -*-
# Generated by Django 1.11.12 on 2018-09-28 12:44
from __future__ import unicode_literals

import authentication_service.request_client.models
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import project.settings


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='RequestedClient',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('client_environment', models.CharField(choices=[('qa', 'QA'), ('prod', 'Production')], help_text='The environment the site needs a client for.', max_length=10)),
                ('name', models.CharField(max_length=100, verbose_name='Name')),
                ('client_type', models.CharField(choices=[('confidential', 'Confidential'), ('public', 'Public')], default='confidential', help_text='Confidential clients: Are capable of maintaining the confidentiality of their credentials. Public clients: are incapable of maintaining the confidentiality.', max_length=30, verbose_name='Client Type')),
                ('response_type', models.CharField(choices=[('code', 'code (Authorization Code Flow)'), ('id_token', 'id_token (Implicit Flow)'), ('id_token token', 'id_token token (Implicit Flow)'), ('code token', 'code token (Hybrid Flow)'), ('code id_token', 'code id_token (Hybrid Flow)'), ('code id_token token', 'code id_token token (Hybrid Flow)')], max_length=30, verbose_name='Response Type')),
                ('jwt_alg', models.CharField(choices=[('HS256', 'HS256'), ('RS256', 'RS256')], default='HS256', help_text='Algorithm used to encode ID Tokens.', max_length=10, verbose_name='JWT Algorithm')),
                ('website_url', models.CharField(max_length=255, verbose_name='Website URL')),
                ('terms_url', models.CharField(blank=True, default='', max_length=255, verbose_name='Terms and conditions URL')),
                ('contact_email', models.CharField(blank=True, default='', max_length=255, verbose_name='Website contact Email')),
                ('logo', models.ImageField(blank=True, null=True, storage=project.settings.MediaStorage(), upload_to=authentication_service.request_client.models.client_logo_path)),
                ('reuse_consent', models.BooleanField(default=True, help_text="If enabled, server will save the user consent given to this specific site, so that user won't be prompted for the same authorization multiple times.", verbose_name='Reuse Consent?')),
                ('redirect_uris', models.TextField(help_text='Post login URIs. Please use a comma delimited list.', verbose_name='Redirect URIs')),
                ('post_logout_redirect_uris', models.TextField(blank=True, default='', help_text='Post logout URIs. Please use a comma delimited list.', verbose_name='Post Logout Redirect URIs')),
                ('scope', models.TextField(blank=True, default='', help_text='Specifies the authorized scope values for the site.', verbose_name='Scopes')),
                ('requesting_user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
