TF-571 Implement AuthenticationOIDC repository with Hive
This commit is contained in:
committed by
Dat H. Pham
parent
03777be4a8
commit
471465e1bc
@@ -0,0 +1,26 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:hive/hive.dart';
|
||||
import 'package:tmail_ui_user/features/caching/utils/caching_constants.dart';
|
||||
|
||||
part 'token_oidc_cache.g.dart';
|
||||
|
||||
@HiveType(typeId: CachingConstants.TOKEN_OIDC_HIVE_CACHE_IDENTIFY)
|
||||
class TokenOidcCache extends HiveObject with EquatableMixin {
|
||||
|
||||
@HiveField(0)
|
||||
final String token;
|
||||
|
||||
@HiveField(1)
|
||||
final String tokenId;
|
||||
|
||||
@HiveField(2)
|
||||
final DateTime? expiredTime;
|
||||
|
||||
@HiveField(3)
|
||||
final String refreshToken;
|
||||
|
||||
TokenOidcCache(this.token, this.tokenId, this.refreshToken, {this.expiredTime});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [token, tokenId, expiredTime, refreshToken];
|
||||
}
|
||||
Reference in New Issue
Block a user