def generate_subject
      if self.class.base_uri
        s = self.class.base_uri.dup
        s.fragment = SecureRandom.urlsafe_base64
        s
      else
        raise Kalimba::KalimbaError, "Cannot generate subject without a base URI"
      end
    end
def generate_subject
      if self.class.base_uri
        s = self.class.base_uri.dup
        s.fragment = SecureRandom.urlsafe_base64
        s
      else
        raise Kalimba::KalimbaError, "Cannot generate subject without a base URI"
      end
    end
Overridden implementation should return URI for the subject, generated by
 using specific random/default/sequential URI generation capabilities.
 Otherwise it should return nil.

 @raise [Kalimba::KalimbaError] if cannot generate subject URI
 @return [URI, nil]