geonode.security.oauth2_validators ================================== .. py:module:: geonode.security.oauth2_validators Attributes ---------- .. autoapisummary:: geonode.security.oauth2_validators.log Classes ------- .. autoapisummary:: geonode.security.oauth2_validators.OIDCValidator Module Contents --------------- .. py:data:: log .. py:class:: OIDCValidator Bases: :py:obj:`oauth2_provider.oauth2_validators.OAuth2Validator` .. rubric:: Example Check if the username and password correspond to a valid and active User. If authentication fails, try Facebook token authentication. Example method: .. code-block:: python def validate_user(self, username, password, client, request, *args, **kwargs): u = authenticate(username=username, password=password) if u is None or not u.is_active: u = authenticate_with_facebook() if u is not None and u.is_active: request.user = u return True return False .. py:method:: get_authorization_code_nonce(client_id, code, redirect_uri, request) .. py:method:: get_id_token(token, token_handler, request)