Skip to content

Commit

Permalink
fixup! Fix vertx/reactive
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle Thorpe committed Oct 4, 2023
1 parent da77448 commit 2b10a36
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 22 deletions.
4 changes: 2 additions & 2 deletions crnk-integration-examples/dagger-vertx-example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ dependencies {

implementation 'ch.qos.logback:logback-classic:1.2.3'
implementation 'jakarta.inject:jakarta.inject-api:2.0.1'
implementation 'com.google.dagger:dagger:2.16'
implementation 'com.google.dagger:dagger:2.48'

annotationProcessor 'com.google.dagger:dagger-compiler:2.16'
annotationProcessor 'com.google.dagger:dagger-compiler:2.48'
}

// https://github.com/immutables/immutables/issues/134 issues with incremental compilation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ public interface AppComponent {

// void inject(MyFragment fragment);
// void inject(MyService service);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,8 @@
import io.crnk.security.ResourcePermission;
import io.crnk.security.SecurityConfig;
import io.crnk.security.SecurityModule;
import io.vertx.core.AsyncResult;
import io.vertx.core.Future;
import io.vertx.core.Handler;
import io.vertx.core.json.JsonObject;
import io.vertx.ext.auth.AbstractUser;
import io.vertx.ext.auth.AuthProvider;
import io.vertx.ext.auth.User;

Expand Down Expand Up @@ -55,23 +52,8 @@ public VertxSecurityProvider securityProvider(AuthProvider authProvider) {
@Singleton
public AuthProvider authProvider() {
return (authInfo, resultHandler) -> {
User user = new AbstractUser() {
@Override
protected void doIsPermitted(String permission, Handler<AsyncResult<Boolean>> resultHandler) {
resultHandler.handle(Future.succeededFuture(true));
}
User user = User.create(new JsonObject().put("name", "john doe"));

@Override
public JsonObject principal() {
JsonObject object = new JsonObject();
return object.put("name", "john doe");
}

@Override
public void setAuthProvider(AuthProvider authProvider) {

}
};
resultHandler.handle(Future.succeededFuture(user));
};
}
Expand Down

0 comments on commit 2b10a36

Please sign in to comment.