/// <summary> /// 验证访问授权是否合法 /// </summary> /// <param name="key"></param> /// <param name="secert"></param> public static bool Vaild(string key, string secert) { var ret = AccessKeys.Any(a => a.AccessKeyId == key && a.AccessKeySecret == secert); return(ret); }
/// <summary> /// Determine if an access key has access to this workspace /// </summary> /// <param name="accessKey"></param> /// <returns></returns> public bool HasAccess(string accessKey) => AccessKeys.Any(x => x.AccountName == accessKey);