Exemplo n.º 1
0
 public ContatosController(EmpresaDbContext context, IDataProtectionProvider protectionProvider,
                           IConfiguration configuration)
 {
     _context           = context;
     _protectorProvider = protectionProvider
                          .CreateProtector(configuration.GetSection("ChaveCriptografia").Value);
 }
Exemplo n.º 2
0
 public ContatosController(EmpresaDbContext db,
                           IDataProtectionProvider protectionProvider,
                           IConfiguration configuracao) //Aqui o db é um parâmetro    //ctor tab tab.
 {
     _db = db;
     _protectorProvider = protectionProvider.CreateProtector(configuracao.GetSection("ChaveCriptografia").Value);//o nome da sessão
 }
Exemplo n.º 3
0
 public HomeController(EmpresaDbContext contexto, IDataProtectionProvider protectionProvider,
                       IConfiguration configuracao)
 {
     _contexto          = contexto;
     _protectorProvider = protectionProvider.CreateProtector(configuracao.GetSection("ChaveCriptografia").Value);
     _configuracao      = configuracao;
 }
Exemplo n.º 4
0
        private string _tipoAutenticacao; //É um field

        public LoginController(EmpresaDbContext db,
                               IDataProtectionProvider protectionProvider,
                               IConfiguration configuracao) //Aqui o db é um parâmetro    //ctor tab tab.
        {
            _db = db;
            _protectorProvider = protectionProvider.CreateProtector(configuracao.GetSection("ChaveCriptografia").Value); //o nome da sessão
            _tipoAutenticacao  = configuracao.GetSection("TipoAutenticacao").Value;                                      //Agora estamos expondo o texto "Value"
        }
Exemplo n.º 5
0
 public ContatosController(EmpresaDbContext db,
                           IDataProtectionProvider protectionProvider,
                           IConfiguration configuracao)
 {
     //this.db = db;
     _db = db;
     _protectorProvider = protectionProvider.CreateProtector(configuracao.GetSection("ChaveCriptografia").Value);
 }
Exemplo n.º 6
0
 public LoginController(EmpresaDbContext db,
                        IDataProtectionProvider protectionProvider,
                        IConfiguration configuracao)
 {
     //this.db = db;
     _db = db;
     _protectorProvider = protectionProvider.CreateProtector(configuracao.GetSection("ChaveCriptografia").Value);
     _tipoAutenticacao  = configuracao.GetSection("TipoAutenticacao").Value;
 }
Exemplo n.º 7
0
 public ContatosController(EmpresaDbContext db)
 {
     _db = db;
 }
Exemplo n.º 8
0
 public ContatosController(EmpresaDbContext contexto)
 {
     _contexto = contexto;
 }
 public ContatosController(EmpresaDbContext contexto, IDataProtectionProvider protectionProvider, IConfiguration configuracao)
 {
     _contexto = contexto;
     //Adicionado método para criptografia de senha
     _protectorProvider = protectionProvider.CreateProtector(configuracao.GetSection("ChaveCriptografia").Value);
 }
Exemplo n.º 10
0
 public UnitOfWork(EmpresaDbContext empresaDbContext)
 {
     this._empresaDbContext = empresaDbContext;
 }