mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-06-19 00:05:16 +00:00
Upgrade login system
This commit is contained in:
@ -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
|
||||
|
@ -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});
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user