Interface CsrfTokenResolver<T>

Type Parameters:
T - request
All Superinterfaces:
io.micronaut.core.order.Ordered

public interface CsrfTokenResolver<T> extends io.micronaut.core.order.Ordered
Attempts to resolve a CSRF token from the provided request. CsrfTokenResolver is an Ordered api. Override the Ordered.getOrder() method to provide a custom order.
Since:
1.1.0
Author:
Sergio del Amo
  • Field Summary

    Fields inherited from interface io.micronaut.core.order.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Method Summary

    Modifier and Type
    Method
    Description
    @NonNull Optional<String>
    resolveToken(T request)
     

    Methods inherited from interface io.micronaut.core.order.Ordered

    getOrder
  • Method Details

    • resolveToken

      @NonNull @NonNull Optional<String> resolveToken(@NonNull T request)
      Parameters:
      request - The Request. Maybe an HTTP Request.
      Returns:
      A CSRF token or an empty Optional if the token cannot be resolved.