TF-1963 Sync handle exception at data and domain layer
(cherry picked from commit 591388e01fc4fc4c357bdb40a44dac0377dc9fe5)
This commit is contained in:
+1
-1
@@ -13,7 +13,7 @@ abstract class AuthenticationClientBase {
|
||||
String discoveryUrl,
|
||||
List<String> scopes);
|
||||
|
||||
Future<String?> getAuthenticationInfo();
|
||||
Future<String> getAuthenticationInfo();
|
||||
|
||||
Future<TokenOIDC> getTokenOIDC(
|
||||
String clientId,
|
||||
|
||||
+2
-2
@@ -93,8 +93,8 @@ class AuthenticationClientMobile implements AuthenticationClientBase {
|
||||
}
|
||||
|
||||
@override
|
||||
Future<String?> getAuthenticationInfo() {
|
||||
return Future.value(null);
|
||||
Future<String> getAuthenticationInfo() {
|
||||
return Future.value('');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+6
-2
@@ -97,10 +97,14 @@ class AuthenticationClientWeb implements AuthenticationClientBase {
|
||||
}
|
||||
|
||||
@override
|
||||
Future<String?> getAuthenticationInfo() async {
|
||||
Future<String> getAuthenticationInfo() async {
|
||||
final authUrl = html.window.sessionStorage[OIDCConstant.authResponseKey];
|
||||
log('AuthenticationClientWeb::getAuthenticationInfo(): authUrl: $authUrl');
|
||||
return authUrl;
|
||||
if (authUrl != null && authUrl.isNotEmpty) {
|
||||
return authUrl;
|
||||
} else {
|
||||
throw CanNotAuthenticationInfoOnWeb();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user