forked from baron/baron-sso
Align RP auto login launch behavior
This commit is contained in:
@@ -43,22 +43,36 @@ void main() {
|
||||
expect(rp.autoLoginUrl, 'https://example.com/login?auto=1');
|
||||
});
|
||||
|
||||
test('자동 로그인 지원 앱은 initUrl을 우선 진입 URL로 사용한다', () {
|
||||
test('자동 로그인 지원 앱은 autoLoginUrl을 우선 진입 URL로 사용한다', () {
|
||||
final launchUrl = resolveLinkedRpLaunchUrl(
|
||||
_linkedRp(
|
||||
status: 'active',
|
||||
url: 'https://example.com',
|
||||
initUrl: 'https://sso.example.com/oidc/oauth2/auth?client_id=client-1',
|
||||
autoLoginSupported: true,
|
||||
autoLoginUrl: 'https://example.com/login?auto=1',
|
||||
),
|
||||
);
|
||||
|
||||
expect(
|
||||
launchUrl,
|
||||
'https://sso.example.com/oidc/oauth2/auth?client_id=client-1',
|
||||
'https://example.com/login?auto=1',
|
||||
);
|
||||
});
|
||||
|
||||
test('자동 로그인 지원 앱은 autoLoginUrl이 없으면 initUrl로 폴백한다', () {
|
||||
final launchUrl = resolveLinkedRpLaunchUrl(
|
||||
_linkedRp(
|
||||
status: 'active',
|
||||
url: 'https://example.com',
|
||||
initUrl: 'https://example.com/login?auto=1',
|
||||
autoLoginSupported: true,
|
||||
),
|
||||
);
|
||||
|
||||
expect(launchUrl, 'https://example.com/login?auto=1');
|
||||
});
|
||||
|
||||
test('자동 로그인 미지원 앱은 initUrl이 있어도 기존 url로 폴백한다', () {
|
||||
final launchUrl = resolveLinkedRpLaunchUrl(
|
||||
_linkedRp(
|
||||
|
||||
Reference in New Issue
Block a user