1
0
forked from baron/baron-sso
Files
baron-sso/userfront/lib/features/auth/domain/consent_scope_policy.dart

12 lines
346 B
Dart

bool isOfflineScopeAlias(String scope) {
final normalized = scope.trim().toLowerCase();
return normalized == 'offline';
}
List<String> filterConsentScopes(Iterable<String> scopes) {
return scopes
.map((scope) => scope.trim())
.where((scope) => scope.isNotEmpty && !isOfflineScopeAlias(scope))
.toList(growable: false);
}