From 03777be4a8425407b65ad76b64d9105d4e06c91c Mon Sep 17 00:00:00 2001 From: Dat PHAM HOANG Date: Tue, 31 May 2022 14:27:40 +0700 Subject: [PATCH] TF-571 Add method to OIDCRepository to store/get OIDC in cache --- .../login/data/datasource/authentication_oidc_datasource.dart | 4 ++++ .../domain/repository/authentication_oidc_repository.dart | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/lib/features/login/data/datasource/authentication_oidc_datasource.dart b/lib/features/login/data/datasource/authentication_oidc_datasource.dart index 9ffa730a0..42e0c75b1 100644 --- a/lib/features/login/data/datasource/authentication_oidc_datasource.dart +++ b/lib/features/login/data/datasource/authentication_oidc_datasource.dart @@ -7,4 +7,8 @@ abstract class AuthenticationOIDCDataSource { Future getOIDCConfiguration(Uri baseUri, OIDCResponse oidcResponse); Future getTokenOIDC(String clientId, String redirectUrl, String discoveryUrl, List scopes); + + Future persistTokenOIDC(TokenOIDC tokenOidc); + + Future getStoredTokenOIDC(String tokenIdHash); } \ No newline at end of file diff --git a/lib/features/login/domain/repository/authentication_oidc_repository.dart b/lib/features/login/domain/repository/authentication_oidc_repository.dart index cda0bff6c..ebea5a7b3 100644 --- a/lib/features/login/domain/repository/authentication_oidc_repository.dart +++ b/lib/features/login/domain/repository/authentication_oidc_repository.dart @@ -7,4 +7,8 @@ abstract class AuthenticationOIDCRepository { Future getOIDCConfiguration(Uri baseUri, OIDCResponse oidcResponse); Future getTokenOIDC(String clientId, String redirectUrl, String discoveryUrl, List scopes); + + Future persistTokenOIDC(TokenOIDC tokenOidc); + + Future getStoredTokenOIDC(String tokenIdHash); } \ No newline at end of file