1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2025-06-19 00:05:16 +00:00

Upgrade login system

This commit is contained in:
2021-02-13 16:03:07 +01:00
parent 581059cb1d
commit e5ed4fadda
7 changed files with 32 additions and 63 deletions

View File

@ -9,22 +9,20 @@ class Config {
final String apiServerName;
final String apiServerUri;
final bool apiServerSecure;
final String serviceName;
final String serviceToken;
final String clientName;
final String termsOfServicesURL;
const Config({
@required this.apiServerName,
@required this.apiServerUri,
@required this.apiServerSecure,
@required this.serviceName,
@required this.serviceToken,
@required this.clientName,
@required this.termsOfServicesURL,
}) : assert(apiServerName != null),
assert(apiServerUri != null),
assert(apiServerSecure != null),
assert(serviceName != null),
assert(serviceToken != null),
assert(clientName != null),
assert(termsOfServicesURL != null);
/// Get and set static configuration

View File

@ -1,23 +0,0 @@
import 'dart:convert';
/// Login tokens model
///
/// @author Pierre HUBERT
class LoginTokens {
final String tokenOne;
final String tokenTwo;
const LoginTokens(this.tokenOne, this.tokenTwo)
: assert(tokenOne != null),
assert(tokenTwo != null);
LoginTokens.fromJSON(Map<String, dynamic> json)
: tokenOne = json["token_one"],
tokenTwo = json["token_two"];
@override
String toString() {
return jsonEncode({"token_one": tokenOne, "token_two": tokenTwo});
}
}