Ejemplo n.º 1
0
        public DefaultCsrfTokenValidatorFixture()
        {
            var cryptoConfig = CryptographyConfiguration.Default;

            this.hmacProvider = cryptoConfig.HmacProvider;
            this.validator    = new DefaultCsrfTokenValidator(cryptoConfig);
        }
Ejemplo n.º 2
0
 public CsrfStartup(CryptographyConfiguration cryptographyConfiguration, IObjectSerializer objectSerializer, ICsrfTokenValidator tokenValidator)
 {
     CryptographyConfiguration = cryptographyConfiguration;
     ObjectSerializer = objectSerializer;
     TokenValidator = tokenValidator;
 }
Ejemplo n.º 3
0
 public CsrfStartup(CryptographyConfiguration cryptographyConfiguration, IObjectSerializer objectSerializer, ICsrfTokenValidator tokenValidator)
 {
     CryptographyConfiguration = cryptographyConfiguration;
     ObjectSerializer          = objectSerializer;
     TokenValidator            = tokenValidator;
 }
 public DefaultCsrfTokenValidatorFixture()
 {
     var cryptoConfig = CryptographyConfiguration.Default;
     this.hmacProvider = cryptoConfig.HmacProvider;
     this.validator = new DefaultCsrfTokenValidator(cryptoConfig);            
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CsrfApplicationStartup"/> class, using the
 /// provided <paramref name="cryptographyConfiguration"/> and <paramref name="tokenValidator"/>.
 /// </summary>
 /// <param name="cryptographyConfiguration">The cryptographic configuration to use.</param>
 /// <param name="tokenValidator">The token validator that should be used.</param>
 public CsrfApplicationStartup(CryptographyConfiguration cryptographyConfiguration, ICsrfTokenValidator tokenValidator)
 {
     CryptographyConfiguration = cryptographyConfiguration;
     TokenValidator            = tokenValidator;
 }