Esempio n. 1
0
        public static void Configure(IServiceCollection services, IConfiguration Configuration)
        {
            Secrets.Login myLogin = new Secrets.Login();
            Configuration.GetSection("ConnectionStrings").Bind(myLogin);

            services.AddDataProtection()
            .SetApplicationName("ricardogaefke")
            .PersistKeysToAzureBlobStorage(new Uri(myLogin.Blob))
            .ProtectKeysWithAzureKeyVault(
                myLogin.KeyVault,
                myLogin.ClientID,
                myLogin.ClientSecret
                )
            ;
        }
Esempio n. 2
0
        public static void DataProtection(IServiceCollection Services, IConfiguration Configuration)
        {
            Secrets.Login MyLogin = new Secrets.Login();
            Configuration.GetSection("ConnectionStrings").Bind(MyLogin);

            Services
            .AddDataProtection()
            .SetApplicationName("Profile4d")
            .PersistKeysToAzureBlobStorage(new Uri(MyLogin.Blob))
            .ProtectKeysWithAzureKeyVault(
                MyLogin.KeyVault,
                MyLogin.ClientID,
                MyLogin.ClientSecret
                )
            ;
        }