Interface JwtVerifier<T>

  • All Superinterfaces:
    java.lang.AutoCloseable, java.io.Closeable, org.entur.jwt.jwk.JwksHealthProvider
    All Known Implementing Classes:
    JwtClaimVerifier

    public interface JwtVerifier<T>
    extends org.entur.jwt.jwk.JwksHealthProvider, java.io.Closeable
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      T verify​(java.lang.String token)
      Verify token.
      • Methods inherited from interface java.io.Closeable

        close
      • Methods inherited from interface org.entur.jwt.jwk.JwksHealthProvider

        getHealth
    • Method Detail

      • verify

        T verify​(java.lang.String token)
          throws JwtException,
                 org.entur.jwt.jwk.JwksException
        Verify token. Non-valid tokens are assumed to be logged and returned as null. Exceptions are only used if there is an unexpected problem.
        Parameters:
        token - textual token value - on the form a.b.c
        Returns:
        a verified token, or null.
        Throws:
        JwtException - on problem with token (i.e. known signature type not available)
        org.entur.jwt.jwk.JwksException - on problem with signing keys (i.e. authorization server is down)