'Ensure client supplied user id hint matches session user.
If the sub claim or id_token_hint is supplied then the session
user must match the given ID.
:param id_token_hint: User identifier string.
:param scopes: List of OAuth 2 scopes and OpenID claims (strings).
:param claims: OpenID Connect claims dict.
:param request: The HTTP Request (oauthlib.common.Request)
:rtype: True or False
Method is used by:
- OpenIDConnectAuthCode
- OpenIDConnectImplicit
- OpenIDConnectHybrid'

def validate_user_match(self, id_token_hint, scopes, claims, request):

    if (id_token_hint and (id_token_hint == frappe.get_value('User', frappe.session.user, 'frappe_userid'))):
        return True
    else:
        return False
