TF-571 Get token from authentication sso

This commit is contained in:
dab246
2022-05-20 15:17:57 +07:00
committed by Dat H. Pham
parent ffb5cadc16
commit 4804a1659a
20 changed files with 227 additions and 11 deletions
+17
View File
@@ -0,0 +1,17 @@
import 'package:equatable/equatable.dart';
import 'package:model/oidc/token_id.dart';
class Token extends Equatable {
const Token(this.token, this.tokenId);
final String token;
final TokenId tokenId;
@override
List<Object> get props => [token, tokenId];
}
extension TokenExtension on Token {
bool isTokenValid() => token.isNotEmpty && tokenId.uuid.isNotEmpty;
}