forked from baron/baron-sso
offline 스코프 제거, rp_claims 값 표준화
This commit is contained in:
25
userfront/test/consent_scope_policy_test.dart
Normal file
25
userfront/test/consent_scope_policy_test.dart
Normal file
@@ -0,0 +1,25 @@
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:userfront/features/auth/domain/consent_scope_policy.dart';
|
||||
|
||||
void main() {
|
||||
group('consent scope policy', () {
|
||||
test('filters offline scope aliases from requested consent scopes', () {
|
||||
expect(
|
||||
filterConsentScopes([
|
||||
'openid',
|
||||
' offline ',
|
||||
'profile',
|
||||
'offline_access',
|
||||
'email',
|
||||
]),
|
||||
['openid', 'profile', 'email'],
|
||||
);
|
||||
});
|
||||
|
||||
test('detects refresh token scope aliases case-insensitively', () {
|
||||
expect(isRefreshTokenScopeAlias('OFFLINE'), isTrue);
|
||||
expect(isRefreshTokenScopeAlias(' offline_access '), isTrue);
|
||||
expect(isRefreshTokenScopeAlias('profile'), isFalse);
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user