TF-571 Add account to identify which account with AuthenticationType are using
This commit is contained in:
committed by
Dat H. Pham
parent
7d32e80bc1
commit
a7d54479d9
@@ -0,0 +1,13 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:model/account/authentication_type.dart';
|
||||
|
||||
class Account with EquatableMixin {
|
||||
final String id;
|
||||
final AuthenticationType authenticationType;
|
||||
final bool isSelected;
|
||||
|
||||
Account(this.id, this.authenticationType, {required this.isSelected});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [id, authenticationType, isSelected];
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
enum AuthenticationType {
|
||||
basic,
|
||||
oidc,
|
||||
none
|
||||
}
|
||||
|
||||
extension AuthenticationTypeExtension on AuthenticationType {
|
||||
String asString() {
|
||||
switch (this) {
|
||||
case AuthenticationType.oidc:
|
||||
return 'oidc';
|
||||
case AuthenticationType.basic:
|
||||
return 'basic';
|
||||
default:
|
||||
return 'none';
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user