Skip to content
This repository was archived by the owner on Nov 20, 2018. It is now read-only.

AuthenticationHandlerProvider GetHandlerAsync Method cache need use current HttpContent to Initalize?? #1020

Closed
oolee opened this issue Jun 20, 2018 · 2 comments

Comments

@oolee
Copy link

oolee commented Jun 20, 2018

cache(_handlerMap) need use current HttpContent to Initalize??

             if (_handlerMap.ContainsKey(authenticationScheme)) {
                return _handlerMap[authenticationScheme];
            }

--->

            var scheme = await Schemes.GetSchemeAsync(authenticationScheme);
            if (scheme == null) {
                return null;
            }

            if (_handlerMap.ContainsKey(authenticationScheme)) {
                var _handler = _handlerMap[authenticationScheme];
                await _handler.InitializeAsync(scheme, context);
                return _handler;
            }
@oolee
Copy link
Author

oolee commented Jun 21, 2018

Thanks Tratcher for edit

@oolee
Copy link
Author

oolee commented Jun 21, 2018

services.TryAddScoped<IAuthenticationHandlerProvider, AuthenticationHandlerProvider>()
becuse this Provider register by Scope,so cache do't need use current HttpCountent to initalize.

@oolee oolee closed this as completed Jun 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant