Interface AuthJwtFilter


public interface AuthJwtFilter
Defines Route filters using JWT authentication mechanism.
  • Method Summary

    Static Methods
    Modifier and Type
    Method
    Description
    static one.jpro.platform.routing.Filter
    create(@NotNull one.jpro.platform.auth.core.jwt.JWTAuthenticationProvider authProvider, @NotNull org.json.JSONObject credentials, @NotNull String authPath, @NotNull String tokenPath, @NotNull Function<one.jpro.platform.auth.core.authentication.User,one.jpro.platform.routing.Response> userFunction, @NotNull Function<Throwable,one.jpro.platform.routing.Response> errorFunction)
    Creates Route filter from a given OAuth2AuthenticationProvider, OAuth2Credentials and functions for handling successful and error cases.
  • Method Details

    • create

      static one.jpro.platform.routing.Filter create(@NotNull @NotNull one.jpro.platform.auth.core.jwt.JWTAuthenticationProvider authProvider, @NotNull @NotNull org.json.JSONObject credentials, @NotNull @NotNull String authPath, @NotNull @NotNull String tokenPath, @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)
      Creates Route filter from a given OAuth2AuthenticationProvider, OAuth2Credentials and functions for handling successful and error cases.
      Parameters:
      authProvider - the JWT authentication provider
      credentials - a JSON object with the authentication information
      authPath - the authentication path for the routing
      tokenPath - the token path
      userFunction - operation on the given user argument
      errorFunction - operation on the given error argument
      Returns:
      a Filter object