public bool Authenticate(ClusterNode node, IAuthenticatedConnectionToken token) { if (node.Details.TryGetValue("Authorization", out string value)) { return(token.Token().Equals(value)); } return(false); }
public List <ClusterNode> Filter(IConnectionToken token, List <ClusterNode> nodes) { IAuthenticatedConnectionToken authtoken = token as IAuthenticatedConnectionToken; var list = new List <ClusterNode>(); foreach (var item in nodes) { if (this.authenticateService.Authenticate(item, authtoken)) { list.Add(item); } } return(list); }