public static OAuth2AuthHandler newInstance(io.vertx.ext.web.handler.OAuth2AuthHandler arg) { return arg != null ? new OAuth2AuthHandler(arg) : null; } }
/** * Create a OAuth2 auth handler with host pinning * @param authProvider the auth provider to use * @param callbackURL the callback URL you entered in your provider admin console, usually it should be something like: `https://myserver:8888/callback` * @return the auth handler */ public static io.vertx.rxjava.ext.web.handler.OAuth2AuthHandler create(io.vertx.rxjava.ext.auth.oauth2.OAuth2Auth authProvider, String callbackURL) { io.vertx.rxjava.ext.web.handler.OAuth2AuthHandler ret = io.vertx.rxjava.ext.web.handler.OAuth2AuthHandler.newInstance(io.vertx.ext.web.handler.OAuth2AuthHandler.create(authProvider.getDelegate(), callbackURL)); return ret; }
/** * Parses the credentials from the request into a JsonObject. The implementation should * be able to extract the required info for the auth provider in the format the provider * expects. * @param context the routing context * @return * @deprecated use {@link #rxParseCredentials} instead */ @Deprecated() public Observable<JsonObject> parseCredentialsObservable(io.vertx.rxjava.ext.web.RoutingContext context) { io.vertx.rx.java.ObservableFuture<JsonObject> handler = io.vertx.rx.java.RxHelper.observableFuture(); parseCredentials(context, handler.toHandler()); return handler; }
/** * Authorizes the given user against all added authorities. * @param user a user. * @return * @deprecated use {@link #rxAuthorize} instead */ @Deprecated() public Observable<Void> authorizeObservable(io.vertx.rxjava.ext.auth.User user) { io.vertx.rx.java.ObservableFuture<Void> handler = io.vertx.rx.java.RxHelper.observableFuture(); authorize(user, handler.toHandler()); return handler; }
/** * Create a OAuth2 auth handler with host pinning * @param authProvider the auth provider to use * @param callbackURL the callback URL you entered in your provider admin console, usually it should be something like: `https://myserver:8888/callback` * @return the auth handler */ public static io.vertx.rxjava.ext.web.handler.OAuth2AuthHandler create(io.vertx.rxjava.ext.auth.oauth2.OAuth2Auth authProvider, String callbackURL) { io.vertx.rxjava.ext.web.handler.OAuth2AuthHandler ret = io.vertx.rxjava.ext.web.handler.OAuth2AuthHandler.newInstance(io.vertx.ext.web.handler.OAuth2AuthHandler.create(authProvider.getDelegate(), callbackURL)); return ret; }
/** * Parses the credentials from the request into a JsonObject. The implementation should * be able to extract the required info for the auth provider in the format the provider * expects. * @param context the routing context * @return */ public Single<JsonObject> rxParseCredentials(io.vertx.rxjava.ext.web.RoutingContext context) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> { parseCredentials(context, fut); })); }
/** * Authorizes the given user against all added authorities. * @param user a user. * @return */ public Single<Void> rxAuthorize(io.vertx.rxjava.ext.auth.User user) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> { authorize(user, fut); })); }
/** * Create a OAuth2 auth handler without host pinning. * Most providers will not look to the redirect url but always redirect to * the preconfigured callback. So this factory does not provide a callback url. * @param authProvider the auth provider to use * @return the auth handler */ public static io.vertx.rxjava.ext.web.handler.OAuth2AuthHandler create(io.vertx.rxjava.ext.auth.oauth2.OAuth2Auth authProvider) { io.vertx.rxjava.ext.web.handler.OAuth2AuthHandler ret = io.vertx.rxjava.ext.web.handler.OAuth2AuthHandler.newInstance(io.vertx.ext.web.handler.OAuth2AuthHandler.create(authProvider.getDelegate())); return ret; }
/** * Parses the credentials from the request into a JsonObject. The implementation should * be able to extract the required info for the auth provider in the format the provider * expects. * @param context the routing context * @return */ public Single<JsonObject> rxParseCredentials(io.vertx.rxjava.ext.web.RoutingContext context) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> { parseCredentials(context, fut); })); }
/** * Authorizes the given user against all added authorities. * @param user a user. * @return */ public Single<Void> rxAuthorize(io.vertx.rxjava.ext.auth.User user) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> { authorize(user, fut); })); }
public static OAuth2AuthHandler newInstance(io.vertx.ext.web.handler.OAuth2AuthHandler arg) { return arg != null ? new OAuth2AuthHandler(arg) : null; } }
/** * Create a OAuth2 auth handler without host pinning. * Most providers will not look to the redirect url but always redirect to * the preconfigured callback. So this factory does not provide a callback url. * @param authProvider the auth provider to use * @return the auth handler */ public static io.vertx.rxjava.ext.web.handler.OAuth2AuthHandler create(io.vertx.rxjava.ext.auth.oauth2.OAuth2Auth authProvider) { io.vertx.rxjava.ext.web.handler.OAuth2AuthHandler ret = io.vertx.rxjava.ext.web.handler.OAuth2AuthHandler.newInstance(io.vertx.ext.web.handler.OAuth2AuthHandler.create(authProvider.getDelegate())); return ret; }