public static boolean isAnonymousRequest ( HttpServletRequest request ) { return request != null && ( StringUtils . startsWith ( request . getHeader ( HttpHeaders . AUTHORIZATION ) , "Anonymous" ) || StringUtils . isBlank ( request . getHeader ( HttpHeaders . AUTHORIZATION ) ) ) ; }
Check if Authorization header starts with Anonymous . Used for guest access .