Class JwtUtils

java.lang.Object
io.confluent.security.util.JwtUtils

public class JwtUtils extends Object
  • Field Details

  • Constructor Details

    • JwtUtils

      public JwtUtils()
  • Method Details

    • errorCodes

      public static List<Integer> errorCodes(Throwable t)
      jose error codes, can be logged on server side and help lookup proper messages
      Parameters:
      t - - Possible InvalidJwtException class
      Returns:
      list of error codes or empty list if t is not InvalidJwtException or no error codes.
    • errorMessage

      public static String errorMessage(Throwable t)
      safe and comprehensive error message to log on server and throw to client. InvalidJwtException - Headers: [{"alg":"RS256"}], Additional Details: \ [[Some error - the error happened due to some problem], [Other error - another error, another problem], ...] \ -> Optional[CauseException]
      Parameters:
      t - - Possible InvalidJwtException class
      Returns:
      String describing the error
    • errorDetails

      public static JwtUtils.Error errorDetails(Throwable t, SecurityContext context)
      returns the error encapsulated in Error class for fine grain control.
      Parameters:
      t - - Possible InvalidJwtException class
      Returns:
      String describing the error