Interface TokenResolver

  • All Known Implementing Classes:
    DefaultTokenResolver
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @DefaultImplementation(DefaultTokenResolver.class)
    @FunctionalInterface
    public interface TokenResolver
    Returns the token from the provided request.
    Since:
    1.1.0
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.Optional<java.lang.String> resolveToken​(io.micronaut.http.HttpRequest<?> request)
      Resolves the token from the provided request.
    • Method Detail

      • resolveToken

        java.util.Optional<java.lang.String> resolveToken​(io.micronaut.http.HttpRequest<?> request)
        Resolves the token from the provided request.
        Parameters:
        request - The HTTP request.
        Returns:
        The token in the supplied request. Empty if no token was found.