  
          try:
              auth_parts = base64.b64decode(auth[1]).decode(HTTP_HEADER_ENCODING).partition(':')
          except (TypeError, UnicodeDecodeError):
              msg = _("Invalid basic header. Credentials not correctly base64 encoded.")
              raise exceptions.AuthenticationFailed(msg)
  
          userid, password = auth_parts[0], auth_parts[2]
          return self.authenticate_credentials(userid, password)
  
 
</s> remove             msg = _("Invalid basic header. Credentials string should not contain spaces.")
 </s> add             msg = _('Invalid basic header. Credentials string should not contain spaces.') </s> remove             msg = _("Invalid basic header. No credentials provided.")
 </s> add             msg = _('Invalid basic header. No credentials provided.') </s> remove             msg = _("Invalid token header. Token string should not contain spaces.")
 </s> add             msg = _('Invalid token header. Token string should not contain spaces.') </s> remove             msg = _("Invalid token header. No credentials provided.")
 </s> add             msg = _('Invalid token header. No credentials provided.') </s> remove             raise exceptions.AuthenticationFailed(_("Invalid token"))
 </s> add             raise exceptions.AuthenticationFailed(_('Invalid token.'))
            msg = _('Invalid basic header. Credentials not correctly base64 encoded.')
  
          try:
              auth_parts = base64.b64decode(auth[1]).decode(HTTP_HEADER_ENCODING).partition(':')
          except (TypeError, UnicodeDecodeError):
            msg = _('Invalid basic header. Credentials not correctly base64 encoded.')
              raise exceptions.AuthenticationFailed(msg)
  
          userid, password = auth_parts[0], auth_parts[2]
          return self.authenticate_credentials(userid, password)
  
keep keep keep keep replace keep keep keep keep keep
 prefer single quotes in source and double quotes in user visible strings; add some missing full stops to user visible strings 
rest_framework/authentication.py