Uploaded image for project: 'TomEE'
  1. TomEE
  2. TOMEE-2514

MP-JWT ClaimBean fails if claim not found

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 8.0.0-M2
    • Fix Version/s: 8.0.0-M3, 8.0.0-Final
    • Component/s: None
    • Labels:
      None

      Description

      The MP-JWT ClaimBean implementation fails with a null pointer exception if claim can't be found.

      try

      { final Class<?> type = (Class<?>) ip.getType(); final String claimValue = getClaimValue(key).toString(); return (T) PropertyEditors.getValue(type, claimValue); }

      catch (Exception e)

      { logger.warning(e.getMessage()); }

       

      We should check the getClaimValue(key) value before calling toString on it.

       

        Attachments

          Activity

            People

            • Assignee:
              jlmonteiro Jean-Louis MONTEIRO
              Reporter:
              jlmonteiro Jean-Louis MONTEIRO
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: