private static boolean isValidChallenge(String authenticateHeader, String authChallengePrefix) {
        if (authenticateHeader != null && !authenticateHeader.isEmpty()
                && authenticateHeader.toLowerCase().startsWith(authChallengePrefix.toLowerCase())) {
            return true;
        }
        return false;
    }
private static boolean isValidChallenge ( String authenticateHeader , String authChallengePrefix ) { if ( authenticateHeader != null && ! authenticateHeader . isEmpty ( ) && authenticateHeader . toLowerCase ( ) . startsWith ( authChallengePrefix . toLowerCase ( ) ) ) { return true ; } return false ; }
Verifies whether a challenge is bearer or not.

@param authenticateHeader
the authentication header containing all the challenges.
@param authChallengePrefix
the authentication challenge name.
@return