feat: applied auth wirth session token on dart backend
This commit is contained in:
@@ -16,18 +16,6 @@ class TokenResponseDTO with _$TokenResponseDTO {
|
||||
_$TokenResponseDTOFromJson(json);
|
||||
}
|
||||
|
||||
/// TokenRequestDTO represents a request for operations involving tokens.
|
||||
@freezed
|
||||
class TokenRequestDTO with _$TokenRequestDTO {
|
||||
const factory TokenRequestDTO({
|
||||
required String token,
|
||||
}) = _TokenRequestDTO;
|
||||
|
||||
/// JSON serialization
|
||||
factory TokenRequestDTO.fromJson(Map<String, dynamic> json) =>
|
||||
_$TokenRequestDTOFromJson(json);
|
||||
}
|
||||
|
||||
/// LoginRequestDTO represents the login request.
|
||||
@freezed
|
||||
class LoginRequestDTO with _$LoginRequestDTO {
|
||||
|
||||
@@ -182,157 +182,6 @@ abstract class _TokenResponseDTO implements TokenResponseDTO {
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
TokenRequestDTO _$TokenRequestDTOFromJson(Map<String, dynamic> json) {
|
||||
return _TokenRequestDTO.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$TokenRequestDTO {
|
||||
String get token => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this TokenRequestDTO to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of TokenRequestDTO
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$TokenRequestDTOCopyWith<TokenRequestDTO> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $TokenRequestDTOCopyWith<$Res> {
|
||||
factory $TokenRequestDTOCopyWith(
|
||||
TokenRequestDTO value, $Res Function(TokenRequestDTO) then) =
|
||||
_$TokenRequestDTOCopyWithImpl<$Res, TokenRequestDTO>;
|
||||
@useResult
|
||||
$Res call({String token});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$TokenRequestDTOCopyWithImpl<$Res, $Val extends TokenRequestDTO>
|
||||
implements $TokenRequestDTOCopyWith<$Res> {
|
||||
_$TokenRequestDTOCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of TokenRequestDTO
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? token = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
token: null == token
|
||||
? _value.token
|
||||
: token // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$TokenRequestDTOImplCopyWith<$Res>
|
||||
implements $TokenRequestDTOCopyWith<$Res> {
|
||||
factory _$$TokenRequestDTOImplCopyWith(_$TokenRequestDTOImpl value,
|
||||
$Res Function(_$TokenRequestDTOImpl) then) =
|
||||
__$$TokenRequestDTOImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({String token});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$TokenRequestDTOImplCopyWithImpl<$Res>
|
||||
extends _$TokenRequestDTOCopyWithImpl<$Res, _$TokenRequestDTOImpl>
|
||||
implements _$$TokenRequestDTOImplCopyWith<$Res> {
|
||||
__$$TokenRequestDTOImplCopyWithImpl(
|
||||
_$TokenRequestDTOImpl _value, $Res Function(_$TokenRequestDTOImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of TokenRequestDTO
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? token = null,
|
||||
}) {
|
||||
return _then(_$TokenRequestDTOImpl(
|
||||
token: null == token
|
||||
? _value.token
|
||||
: token // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$TokenRequestDTOImpl implements _TokenRequestDTO {
|
||||
const _$TokenRequestDTOImpl({required this.token});
|
||||
|
||||
factory _$TokenRequestDTOImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$TokenRequestDTOImplFromJson(json);
|
||||
|
||||
@override
|
||||
final String token;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'TokenRequestDTO(token: $token)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$TokenRequestDTOImpl &&
|
||||
(identical(other.token, token) || other.token == token));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, token);
|
||||
|
||||
/// Create a copy of TokenRequestDTO
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$TokenRequestDTOImplCopyWith<_$TokenRequestDTOImpl> get copyWith =>
|
||||
__$$TokenRequestDTOImplCopyWithImpl<_$TokenRequestDTOImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$TokenRequestDTOImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _TokenRequestDTO implements TokenRequestDTO {
|
||||
const factory _TokenRequestDTO({required final String token}) =
|
||||
_$TokenRequestDTOImpl;
|
||||
|
||||
factory _TokenRequestDTO.fromJson(Map<String, dynamic> json) =
|
||||
_$TokenRequestDTOImpl.fromJson;
|
||||
|
||||
@override
|
||||
String get token;
|
||||
|
||||
/// Create a copy of TokenRequestDTO
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$TokenRequestDTOImplCopyWith<_$TokenRequestDTOImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
LoginRequestDTO _$LoginRequestDTOFromJson(Map<String, dynamic> json) {
|
||||
return _LoginRequestDTO.fromJson(json);
|
||||
}
|
||||
|
||||
@@ -20,18 +20,6 @@ Map<String, dynamic> _$$TokenResponseDTOImplToJson(
|
||||
'userId': instance.userId,
|
||||
};
|
||||
|
||||
_$TokenRequestDTOImpl _$$TokenRequestDTOImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$TokenRequestDTOImpl(
|
||||
token: json['token'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$TokenRequestDTOImplToJson(
|
||||
_$TokenRequestDTOImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'token': instance.token,
|
||||
};
|
||||
|
||||
_$LoginRequestDTOImpl _$$LoginRequestDTOImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$LoginRequestDTOImpl(
|
||||
|
||||
Reference in New Issue
Block a user