protected boolean requestRequiresAuthentication ( final HttpServletRequest request , final HttpServletResponse response ) { val accessTokenRequest = isAccessTokenRequest ( request , response ) ; if ( ! accessTokenRequest ) { val extractor = extractAccessTokenGrantRequest ( request ) ; if ( extractor . isPresent ( ) ) { val ext = extractor . get ( ) ; return ext . requestMustBeAuthenticated ( ) ; } } else { val extractor = extractAccessTokenGrantRequest ( request ) ; if ( extractor . isPresent ( ) ) { val ext = extractor . get ( ) ; return ext . getResponseType ( ) != OAuth20ResponseTypes . DEVICE_CODE ; } } return false ; }
Request requires authentication .