Skip to content

Commit 4ae43b9

Browse files
committed
#00000 - account serialization miss-match fix.
1 parent 4ff7de7 commit 4ae43b9

File tree

4 files changed

+17
-7
lines changed

4 files changed

+17
-7
lines changed

CHANGELOG.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,15 @@ Platform alignments
2121
# 0.0.4
2222
Core SDKS updates
2323

24-
* Updated Swift SDK 1.2.0
25-
* Updated Android SDK 5.1.0
24+
* Updated Swift SDK 1.2.0.
25+
* Updated Android SDK 5.1.0.
2626

2727
# 0.0.5
2828
Core SDKS update
2929

30-
* Updated Android SDK 5.1.1 (security)
30+
* Updated Android SDK 5.1.1 (security).
31+
32+
# 0.0.6
33+
Account Model Patch
34+
35+
* Fix to main account model (sessionInfo type).

example/ios/Runner/UserHost.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,7 @@ struct UserHost: GigyaAccountProtocol {
6666
}
6767
return ""
6868
}
69+
70+
var sessionInfo: [String: AnyCodable]?
6971
}
72+

lib/models/gigya_models.dart

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import 'dart:convert';
1+
import 'dart:io';
22

33
/// Available interruptions.
44
enum Interruption {
@@ -149,12 +149,12 @@ class Account extends GigyaResponse {
149149
class SessionInfo {
150150
String sessionToken;
151151
String sessionSecret;
152-
double expirationTime;
152+
dynamic expiresIn;
153153

154154
SessionInfo.fromJson(Map<String, dynamic> json) {
155155
sessionToken = json['sessionToken'];
156156
sessionSecret = json['sessionSecret'];
157-
expirationTime = json['expires_in'];
157+
expiresIn = json['expires_in'];
158158
}
159159

160160
Map<String, dynamic> toJson() {
@@ -164,6 +164,8 @@ class SessionInfo {
164164
data['expires_in'] = this.expirationTime;
165165
return data;
166166
}
167+
168+
double get expirationTime => Platform.isIOS ? double.parse(expiresIn) : expiresIn;
167169
}
168170

169171
/// Account profile schema object.

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: gigya_flutter_plugin
22
description: SAP Gigya Flutter plugin
3-
version: 0.0.5
3+
version: 0.0.6
44
homepage: https://github.com/SAP/gigya-flutter-plugin
55

66
environment:

0 commit comments

Comments
 (0)