public static Task GetAuthenticationTypes(this HttpContextBase context, Action <IDictionary <string, object>, object> callback, object state) { if (context == null) { throw new ArgumentNullException("context"); } OwinRequest request = GetOwinRequest(context); return(request.GetAuthenticationTypes(callback, state)); }
public IEnumerable <AuthenticationDescription> GetAuthenticationTypes(Func <AuthenticationDescription, bool> predicate) { // TODO: refactor the signature to remove the .Wait() on this call path var descriptions = new List <AuthenticationDescription>(); _request.GetAuthenticationTypes((properties, _) => { var description = new AuthenticationDescription(properties); if (predicate(description)) { descriptions.Add(description); } }, null).Wait(); return(descriptions); }