def create_secret(self, value, contributor, metadata=None, expires=None):
        """Create a new secret, returning its handle.

        :param value: Secret value to store
        :param contributor: User owning the secret
        :param metadata: Optional metadata dictionary (must be JSON serializable)
        :param expires: Optional date/time of expiry (defaults to None, which means that
            the secret never expires)
        :return: Secret handle
        """
        if metadata is None:
            metadata = {}

        secret = self.create(
            value=value,
            contributor=contributor,
            metadata=metadata,
            expires=expires,
        )
        return str(secret.handle)
Create a new secret, returning its handle.

        :param value: Secret value to store
        :param contributor: User owning the secret
        :param metadata: Optional metadata dictionary (must be JSON serializable)
        :param expires: Optional date/time of expiry (defaults to None, which means that
            the secret never expires)
        :return: Secret handle