public FilterFunction subjectPresent ( final Optional < String > content ) { return ( Http . RequestHeader requestHeader , DeadboltHandler handler , Function < Http . RequestHeader , CompletionStage < Result > > next ) -> beforeAuthCheckCache . apply ( handler , requestHeader , content ) . thenCompose ( maybePreAuth -> maybePreAuth . _1 . map ( preAuthResult -> ( CompletionStage < Result > ) CompletableFuture . completedFuture ( preAuthResult ) ) . orElseGet ( ( ) -> constraintLogic . subjectPresent ( maybePreAuth . _2 , handler , content , ( rh , hdlr , cntent ) -> next . apply ( rh ) , ( rh , hdlr , cntent ) -> hdlr . onAuthFailure ( rh , cntent ) , ConstraintPoint . FILTER ) ) ) ; }
A constraint that requires a subject to be present .