code: def password(self, request, data, client):
          
  
          data = self.get_password_grant(request, data, client)
          user = data.get('user')
          scope = data.get('scope')
  
          if constants.SINGLE_ACCESS_TOKEN:
              at = self.get_access_token(request, user, scope, client)
          else:
              at = self.create_access_token(request, user, scope, client)
              # Public clients don't get refresh tokens
              if client.client_type != 1:
                  rt = self.create_refresh_token(request, user, scope, at, client)
  
          return self.access_token_response(at)
docs: Handle ``grant_type=password`` requests as defined in :rfc:`4.3`.