selfprivacy.org.app/lib/logic/models/api_token.dart
NaiJi 31be961dd0 Implement server endpoints for tokens
get /auth/recovery_token
post /auth/recovery_token
post /auth/recovery_token/use
post /auth/new_device/authorize
post /auth/new_device
delete /auth/new_device
get /auth/tokens
post /auth/tokens
delete /auth/tokens
2022-05-10 02:16:36 +03:00

21 lines
436 B
Dart

import 'package:easy_localization/easy_localization.dart';
import 'package:json_annotation/json_annotation.dart';
part 'api_token.g.dart';
@JsonSerializable()
class ApiToken {
ApiToken({
required this.name,
required this.date,
required this.is_caller,
});
final String name;
final DateTime date;
final bool is_caller;
factory ApiToken.fromJson(Map<String, dynamic> json) =>
_$ApiTokenFromJson(json);
}