Add a basic form of unsecure authentication (in plain password)

This commit is contained in:
CappielloAntonio 2022-01-11 12:49:40 +01:00
parent e5aec08c8e
commit d93c3bb45c
8 changed files with 44 additions and 9 deletions

View file

@ -33,7 +33,10 @@ public class Server implements Parcelable {
@ColumnInfo(name = "timestamp")
private long timestamp;
public Server(@NonNull String serverId, String serverName, String username, String address, String token, String salt, long timestamp) {
@ColumnInfo(name = "low_security", defaultValue = "false")
private boolean lowSecurity;
public Server(@NonNull String serverId, String serverName, String username, String address, String token, String salt, long timestamp, boolean lowSecurity) {
this.serverId = serverId;
this.serverName = serverName;
this.username = username;
@ -41,6 +44,7 @@ public class Server implements Parcelable {
this.token = token;
this.salt = salt;
this.timestamp = timestamp;
this.lowSecurity = lowSecurity;
}
@NonNull
@ -100,6 +104,14 @@ public class Server implements Parcelable {
this.timestamp = timestamp;
}
public boolean isLowSecurity() {
return lowSecurity;
}
public void setLowSecurity(boolean lowSecurity) {
this.lowSecurity = lowSecurity;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;