          """
  
          auth = get_authorization_header(request).split()
  
          if not auth or auth[0].lower() != 'bearer':
              return None
  
          if len(auth) == 1:
              msg = 'Invalid bearer header. No credentials provided.'
          if len(auth) > 2:
 
</s> remove         if not auth or auth[0].lower() != "token":
 </s> add         if not auth or auth[0].lower() != b'token': </s> remove         if len(auth) > 2:
 </s> add             raise exceptions.AuthenticationFailed(msg)
        elif len(auth) > 2: </s> remove         if len(auth) > 2:
 </s> add             raise exceptions.AuthenticationFailed(msg)
        elif len(auth) > 2: </s> remove         if len(auth) > 2:
 </s> add             raise exceptions.AuthenticationFailed(msg)
        elif len(auth) > 2: </s> remove         auth = "Token " + self.key
 </s> add         auth = 'Token ' + self.key
        if not auth or auth[0].lower() != b'bearer':
          """
  
          auth = get_authorization_header(request).split()
  
        if not auth or auth[0].lower() != b'bearer':
              return None
  
          if len(auth) == 1:
              msg = 'Invalid bearer header. No credentials provided.'
          if len(auth) > 2:
keep keep keep keep replace keep keep keep keep keep
 Fixes for auth header checking. 
rest_framework/authentication.py