TF-624 Implement get authentication info
This commit is contained in:
@@ -12,6 +12,8 @@ abstract class AuthenticationClientBase {
|
||||
String discoveryUrl,
|
||||
List<String> scopes);
|
||||
|
||||
Future<String?> getAuthenticationInfo();
|
||||
|
||||
Future<TokenOIDC> getTokenOIDC(
|
||||
String clientId,
|
||||
String redirectUrl,
|
||||
|
||||
+5
@@ -81,6 +81,11 @@ class AuthenticationClientMobile implements AuthenticationClientBase {
|
||||
String discoveryUrl, List<String> scopes) {
|
||||
return Future.value(null);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<String?> getAuthenticationInfo() {
|
||||
return Future.value(null);
|
||||
}
|
||||
}
|
||||
|
||||
AuthenticationClientBase getAuthenticationClientImplementation() =>
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
|
||||
import 'package:core/utils/app_logger.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:tmail_ui_user/features/login/data/network/config/oidc_constant.dart';
|
||||
import 'package:universal_html/html.dart' as html;
|
||||
import 'package:tmail_ui_user/features/login/data/network/authentication_client/authentication_client_base.dart';
|
||||
import 'package:flutter_appauth_platform_interface/flutter_appauth_platform_interface.dart';
|
||||
import 'package:model/oidc/oidc_configuration.dart';
|
||||
@@ -41,6 +44,13 @@ class AuthenticationClientWeb implements AuthenticationClientBase {
|
||||
discoveryUrl: discoveryUrl,
|
||||
scopes: scopes));
|
||||
}
|
||||
|
||||
@override
|
||||
Future<String?> getAuthenticationInfo() async {
|
||||
final authUrl = html.window.sessionStorage[OIDCConstant.authResponseKey];
|
||||
log('AuthenticationClientWeb::getAuthenticationInfo(): authUrl: $authUrl');
|
||||
return authUrl;
|
||||
}
|
||||
}
|
||||
|
||||
AuthenticationClientBase getAuthenticationClientImplementation() =>
|
||||
|
||||
Reference in New Issue
Block a user