コード例 #1
0
        public async Task <IEnumerable <AuthenticateResult> > AuthenticateAsync(string[] authenticationTypes)
        {
            var descriptions = new List <AuthenticateResult>();
            await _request.Authenticate(
                authenticationTypes,
                (identity, extra, description, state) => ((List <AuthenticateResult>)state).Add(new AuthenticateResult(identity, extra, description)), descriptions);

            return(descriptions);
        }
コード例 #2
0
        public static Task Authenticate(this HttpContextBase context, string[] authenticationTypes, Action <IIdentity,
                                                                                                            IDictionary <string, string>, IDictionary <string, object>, object> callback, object state)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }

            OwinRequest request = GetOwinRequest(context);

            return(request.Authenticate(authenticationTypes, callback, state));
        }