Fix minor regression with Auth feature and REST/Memory backend
See https://matrix.to/#/!NPRUEisLjcaMtHIzDr:kamax.io/$1523216730848820dFUZX:matrix.org
This commit is contained in:
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
package io.kamax.mxisd.auth.provider;
|
package io.kamax.mxisd.auth.provider;
|
||||||
|
|
||||||
import io.kamax.matrix._ThreePid;
|
import io.kamax.matrix.ThreePid;
|
||||||
import io.kamax.mxisd.UserID;
|
import io.kamax.mxisd.UserID;
|
||||||
import io.kamax.mxisd.UserIdType;
|
import io.kamax.mxisd.UserIdType;
|
||||||
|
|
||||||
@@ -32,13 +32,13 @@ public class BackendAuthResult {
|
|||||||
public static class BackendAuthProfile {
|
public static class BackendAuthProfile {
|
||||||
|
|
||||||
private String displayName;
|
private String displayName;
|
||||||
private Set<_ThreePid> threePids = new HashSet<>();
|
private Set<ThreePid> threePids = new HashSet<>();
|
||||||
|
|
||||||
public String getDisplayName() {
|
public String getDisplayName() {
|
||||||
return displayName;
|
return displayName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Set<_ThreePid> getThreePids() {
|
public Set<ThreePid> getThreePids() {
|
||||||
return threePids;
|
return threePids;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -85,7 +85,7 @@ public class BackendAuthResult {
|
|||||||
return profile;
|
return profile;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BackendAuthResult withThreePid(_ThreePid threePid) {
|
public BackendAuthResult withThreePid(ThreePid threePid) {
|
||||||
this.profile.threePids.add(threePid);
|
this.profile.threePids.add(threePid);
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
|
@@ -163,7 +163,7 @@ public class MemoryIdentityStore implements AuthenticatorProvider, IDirectoryPro
|
|||||||
return BackendAuthResult.failure();
|
return BackendAuthResult.failure();
|
||||||
} else {
|
} else {
|
||||||
BackendAuthResult result = new BackendAuthResult();
|
BackendAuthResult result = new BackendAuthResult();
|
||||||
id.getThreepids().forEach(result::withThreePid);
|
id.getThreepids().forEach(tpid -> result.withThreePid(new ThreePid(tpid.getMedium(), tpid.getAddress())));
|
||||||
result.succeed(mxid.getId(), UserIdType.MatrixID.getId(), "");
|
result.succeed(mxid.getId(), UserIdType.MatrixID.getId(), "");
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user