docs: def create_authentication_from_json(values):
          """Create authentitaciton object from a JSON string."""
          key_id = values.get('publicKey')
          authentication_type = values.get('type')
          if not key_id:
              raise ValueError(
                  f'Invalid authentication definition, "publicKey" is missing: {values}')
  
          authentication = {'type': authentication_type, 'publicKey': key_id}
  
          return authentication