@classmethod
def GetCredentials(cls, path_spec):
    """Retrieves the credentials for a specific path specification.

    Args:
      path_spec (PathSpec): path specification.

    Returns:
      Credentials: credentials or None if the path specification has no
          credentials support.
    """
    if not path_spec:
        return None
    return cls._credentials.get(path_spec.type_indicator, None)
