protected boolean isAuthenticated ( final By by , final HttpServletRequest request ) { final String [ ] authToks = parseAuthorization ( request ) ; if ( authToks == null ) { return false ; } // we don't enforce the "deploy" user name anymore final String deployKey = authToks [ 1 ] ; logger . debug ( "Deploy key: '{}'" , deployKey ) ; final ChannelService service = getService ( request ) ; if ( service == null ) { logger . info ( "Called 'isAuthenticated' without service" ) ; return false ; } return service . getChannelDeployKeyStrings ( by ) . orElse ( Collections . emptySet ( ) ) . contains ( deployKey ) ; }
Simply test if the request is authenticated against the channels deploy keys