(self, request)
Validate the request. Raises an AuthenticationException if the
        request fails authentication.

        **Args:**

        * *request:* Django HttpRequest object.

        *Returns None*
Validate the request. Raises an AuthenticationException if the
        request fails authentication.
Validate the request . Raises an AuthenticationException if the request fails authentication .
def validate(self, request):
        """Validate the request. Raises an AuthenticationException if the
        request fails authentication.

        **Args:**

        * *request:* Django HttpRequest object.

        *Returns None*"""
        self.request = request
        self.bearer_token = request.REQUEST.get('bearer_token')
        if "HTTP_AUTHORIZATION" in self.request.META:
            auth = self.request.META["HTTP_AUTHORIZATION"].split()
            self.auth_type = auth[0].lower()
            self.auth_value = " ".join(auth[1:]).strip()
        self.request_hostname = self.request.META.get("REMOTE_HOST")
        self.request_port = self.request.META.get("SERVER_PORT")
        try:
            self._validate()
        except AuthenticationException, e:
            self.error = e
            raise e
        self.valid = True
def validate ( self , request ) : self . request = request self . bearer_token = request . REQUEST . get ( 'bearer_token' ) if "HTTP_AUTHORIZATION" in self . request . META : auth = self . request . META [ "HTTP_AUTHORIZATION" ] . split ( ) self . auth_type = auth [ 0 ] . lower ( ) self . auth_value = " " . join ( auth [ 1 : ] ) . strip ( ) self . request_hostname = self . request . META . get ( "REMOTE_HOST" ) self . request_port = self . request . META . get ( "SERVER_PORT" ) try : self . _validate ( ) except AuthenticationException , e : self . error = e raise e self . valid = True