public CustomAuthenticationStateProvider(ILoggerFactory loggerFactory, IServiceScopeFactory scopeFactory,
                                          Blazored.SessionStorage.ISessionStorageService sessionStorage,
                                          IOptions <IdentityOptions> optionsAccessor, UserManager <User> context)
     : base(loggerFactory, scopeFactory, optionsAccessor)
 {
     this.context    = context;
     _sessionStorage = sessionStorage;
 }
Пример #2
0
        public BookStoreService(System.Net.Http.HttpClient httpClient,
                                Microsoft.Extensions.Options.IOptions <Data.AppSettings> appSettings,
                                Blazored.SessionStorage.ISessionStorageService sessionStorageService)
        {
            _appSettings           = appSettings.Value;
            _sessionStorageService = sessionStorageService;

            httpClient.BaseAddress = new System.Uri(_appSettings.BookStoresBaseAddress);
            httpClient.DefaultRequestHeaders.Add("User-Agent", "BlazorServer");

            _httpClient = httpClient;
        }
Пример #3
0
        public UserSession(ISessionAPI sessionApi, Blazored.SessionStorage.ISessionStorageService sessionStorage,
                           Blazored.LocalStorage.ILocalStorageService localStorage)
        {
            this._sessionApi     = sessionApi;
            this._sessionStorage = sessionStorage;
            this._localStorage   = localStorage;

            _sessionApi.NewTokenCreated += async(s, e) =>
            {
                await SessionApiOnNewTokenCreated(s, e);
            };
        }
Пример #4
0
 public SessionAPI(HttpClient httpClient, Blazored.SessionStorage.ISessionStorageService sessionStorage)
 {
     _httpClient          = httpClient;
     this._sessionStorage = sessionStorage;
 }
 public CustomAuthenticationStateProvider(Blazored.SessionStorage.ISessionStorageService sessionStorageService)
 {
     _sessionStorageService = sessionStorageService;
 }