Package one.jpro.platform.auth.routing
Interface AuthBasicFilter
public interface AuthBasicFilter
Defines
Route filters using basic (username and password) authentication mechanism.-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic voidauthorize(@NotNull javafx.scene.Node node, @NotNull one.jpro.platform.auth.core.basic.provider.BasicAuthenticationProvider basicAuthProvider) Initiates the authorization process for a given basic authentication provider.static one.jpro.platform.routing.Filtercreate(@NotNull one.jpro.platform.auth.core.basic.provider.BasicAuthenticationProvider authProvider, @NotNull one.jpro.platform.auth.core.basic.UsernamePasswordCredentials credentials, @NotNull Function<one.jpro.platform.auth.core.authentication.User, one.jpro.platform.routing.Response> userFunction, @NotNull Function<Throwable, one.jpro.platform.routing.Response> errorFunction) CreatesRoutefilter from a givenBasicAuthenticationProvider,UsernamePasswordCredentialsand functions for handling successful and error cases.
-
Method Details
-
create
static one.jpro.platform.routing.Filter create(@NotNull @NotNull one.jpro.platform.auth.core.basic.provider.BasicAuthenticationProvider authProvider, @NotNull @NotNull one.jpro.platform.auth.core.basic.UsernamePasswordCredentials credentials, @NotNull @NotNull Function<one.jpro.platform.auth.core.authentication.User, one.jpro.platform.routing.Response> userFunction, @NotNull @NotNull Function<Throwable, one.jpro.platform.routing.Response> errorFunction) CreatesRoutefilter from a givenBasicAuthenticationProvider,UsernamePasswordCredentialsand functions for handling successful and error cases.- Parameters:
authProvider- basic (username and password) authentication providercredentials- basic (username and password) credentialsuserFunction- operation on the given user argumenterrorFunction- operation on the given error argument- Returns:
- a
Filterobject
-
authorize
static void authorize(@NotNull @NotNull javafx.scene.Node node, @NotNull @NotNull one.jpro.platform.auth.core.basic.provider.BasicAuthenticationProvider basicAuthProvider) Initiates the authorization process for a given basic authentication provider.- Parameters:
node- the JavaFX node context for the authorizationbasicAuthProvider- the basic authentication provider
-