Skip to content

Commit

Permalink
Update to latest SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxime Dor committed Mar 9, 2018
1 parent 61fec4a commit c3385b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ dependencies {
compile "org.springframework.boot:spring-boot-starter-thymeleaf:1.5.10.RELEASE"

// Matrix Java SDK
compile 'io.kamax:matrix-java-sdk:0.0.2'
compile 'io.kamax:matrix-java-sdk:0.0.8'

// ed25519 handling
compile 'net.i2p.crypto:eddsa:0.1.0'
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/io/kamax/mxisd/auth/AuthManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class AuthManager {
private InvitationManager invMgr;

public UserAuthResult authenticate(String id, String password) {
_MatrixID mxid = new MatrixID(id);
_MatrixID mxid = MatrixID.asAcceptable(id);
for (AuthenticatorProvider provider : providers) {
if (!provider.isEnabled()) {
continue;
Expand All @@ -63,9 +63,9 @@ public UserAuthResult authenticate(String id, String password) {

String mxId;
if (UserIdType.Localpart.is(result.getId().getType())) {
mxId = new MatrixID(result.getId().getValue(), mxCfg.getDomain()).getId();
mxId = MatrixID.from(result.getId().getValue(), mxCfg.getDomain()).acceptable().getId();
} else if (UserIdType.MatrixID.is(result.getId().getType())) {
mxId = new MatrixID(result.getId().getValue()).getId();
mxId = MatrixID.asAcceptable(result.getId().getValue()).getId();
} else {
log.warn("Unsupported User ID type {} for backend {}", result.getId().getType(), provider.getClass().getSimpleName());
continue;
Expand Down

0 comments on commit c3385b3

Please sign in to comment.