def claims_match(value, claimspec):
if claimspec is None:  <EOL><INDENT>return True<EOL><DEDENT>matched = False<EOL>for key, val in claimspec.items():<EOL><INDENT>if key == "<STR_LIT:value>":<EOL><INDENT>if value == val:<EOL><INDENT>matched = True<EOL><DEDENT><DEDENT>elif key == "<STR_LIT>":<EOL><INDENT>if value in val:<EOL><INDENT>matched = True<EOL><DEDENT><DEDENT>elif key == '<STR_LIT>':<EOL><INDENT>continue<EOL><DEDENT>if matched:<EOL><INDENT>break<EOL><DEDENT><DEDENT>if list(claimspec.keys()) == ['<STR_LIT>']:<EOL><INDENT>return True<EOL><DEDENT>return matched<EOL>
Implements matching according to section 5.5.1 of
http://openid.net/specs/openid-connect-core-1_0.html
The lack of value is not checked here.
Also the text doesn't prohibit claims specification having both 'value' 
and 'values'.

:param value: single value
:param claimspec: None or a dictionary with 'essential', 'value' or 'values'
    as keys
:return: Boolean