def _validate_challenge(self, challenge):
bearer_string = '<STR_LIT>'<EOL>if not challenge:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>challenge = challenge.strip()<EOL>if not challenge.startswith(bearer_string):<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>return challenge[len(bearer_string):]<EOL>
Verifies that the challenge is a Bearer challenge and returns the key=value pairs.