code: @Override
      public Builder claimFrom(String jsonOrJwt) throws InvalidTokenException {
          isValidToken(jsonOrJwt);
          String decoded = jsonOrJwt;
          if (JwtUtils.isBase64Encoded(jsonOrJwt)) {
              decoded = JwtUtils.decodeFromBase64String(jsonOrJwt);
          }
          boolean isJson = JwtUtils.isJson(decoded);
  
          if (!isJson) {
              String jwtPayload = JwtUtils.getPayload(jsonOrJwt);
              decoded = JwtUtils.decodeFromBase64String(jwtPayload);
          }
  
          // boolean isJwt = JwtUtils.isJwtToken(jsonOrJwt);
          // String decoded = jsonOrJwt;
          // if (isJwt) {
          // String jwtPayload = JwtUtils.getPayload(jsonOrJwt);
          // decoded = JwtUtils.decodeFromBase64String(jwtPayload);
          //
          // } else {
          // // either decoded payload from jwt or encoded/decoded json string
          // if (JwtUtils.isBase64Encoded(jsonOrJwt)) {
          // decoded = JwtUtils.decodeFromBase64String(jsonOrJwt);
          // }
          // }
  
          // String formattedString = JwtUtils.fromBase64ToJsonString(jsonOrJwt);
          if (decoded != null) {
              Map claimsFromAnother = null;
              try {
                  claimsFromAnother = JwtUtils.claimsFromJsonObject(decoded);
              } catch (JoseException e) {
                  String err = Tr.formatMessage(tc, "JWT_INVALID_TOKEN_ERR");
                  throw new InvalidTokenException(err);
              }
              if (claimsFromAnother != null && !claimsFromAnother.isEmpty()) {
                  claims.putAll(claimsFromAnother);
              }
          }
          return this;
      }
docs: /*
  (non-Javadoc)
  
  @see com.ibm.ws.security.jwt.internal.Builder#claimFrom(java.lang.String)