@ GET @ Path ( "/verifyInjectedOptionalCustomMissing" ) @ Produces ( MediaType . APPLICATION_JSON ) public JsonObject verifyInjectedOptionalCustomMissing ( ) { boolean pass = false ; String msg ; // custom-missing Optional < Long > customValue = custom . getValue ( ) ; if ( customValue == null ) { msg = "custom-missing value is null, FAIL" ; } else if ( ! customValue . isPresent ( ) ) { msg = "custom-missing PASS" ; pass = true ; } else { msg = String . format ( "custom: %s != %s" , null , customValue . get ( ) ) ; } JsonObject result = Json . createObjectBuilder ( ) . add ( "pass" , pass ) . add ( "msg" , msg ) . build ( ) ; return result ; }
Verify that values exist and that types match the corresponding Claims enum