Example #1
0
 public TokenProvider(ILogger <TokenProvider> log, IOptions <JHipsterSettings> jhipsterSettings)
 {
     _log = log;
     _jhipsterSettings        = jhipsterSettings.Value;
     _jwtSecurityTokenHandler = new JwtSecurityTokenHandler();
     Init();
 }
Example #2
0
 public static IApplicationBuilder UseApplicationSecurity(this IApplicationBuilder @this,
                                                          JHipsterSettings jhipsterSettings)
 {
     @this.UseCors(CorsPolicyBuilder(jhipsterSettings.Cors));
     @this.UseAuthentication();
     // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
     @this.UseHsts();
     @this.UseHttpsRedirection();
     return(@this);
 }
Example #3
0
 public MailService(IOptions <JHipsterSettings> jhipsterSettings)
 {
     _jhipsterSettings = jhipsterSettings.Value;
 }