Interface TokenReader<T>

Type Parameters:
T - request
All Superinterfaces:
io.micronaut.core.order.Ordered
All Known Implementing Classes:
BearerTokenReader, CookieTokenReader, HttpHeaderTokenReader, TokenCookieTokenReader
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface TokenReader<T> extends io.micronaut.core.order.Ordered
Responsible for reading the token data from a request.
Since:
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
    findToken(T request)
    Attempts to retrieve a token in a request.

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

    getOrder
  • Method Details

    • findToken

      Optional<String> findToken(T request)
      Attempts to retrieve a token in a request.
      Parameters:
      request - The request to look for the token in
      Returns:
      An optional token string