public virtual bool IsAnyAuthorized() { return(!this.UserName.IsNullOrEmpty() || ProviderOAuthAccess .Any(x => !string.IsNullOrEmpty(x.AccessTokenSecret) && !string.IsNullOrEmpty(x.AccessToken))); }
public virtual bool IsAuthorized(string provider) { if (!this.UserName.IsNullOrEmpty()) { return(provider == AuthService.CredentialsProvider || provider == AuthService.BasicProvider); } return(ProviderOAuthAccess.Any(x => x.Provider == provider && !string.IsNullOrEmpty(x.AccessTokenSecret) && !string.IsNullOrEmpty(x.AccessToken))); }