public string GetScopeByRoles(string[] roles) { var scopes = new HashSet <string>(); foreach (var scope in DefaultScopes) { scopes.Add(scope); } return(ScopeFormatHelper.JoinScopes(scopes.ToArray())); }
public string GetScopeByRoles(string[] roles) { var scopes = new HashSet <string>(); foreach (var role in roles) { if (ScopesByRoleName.ContainsKey(role)) { foreach (var scope in ScopesByRoleName[role]) { scopes.Add(scope); } } } foreach (var scope in DefaultScopes) { scopes.Add(scope); } return(ScopeFormatHelper.JoinScopes(scopes.ToArray())); }
private static string GetScopeIdentifier(string resourceName, string action) { return(ScopeFormatHelper.FormatScopeIdentifier(resourceName, action)); }