Module: Jabber::PubSub::OAuthPubSubStreamHelper
- Defined in:
- lib/xmpp4r/pubsub/helper/oauth_service_helper.rb
Overview
Jabber::Stream helper that will transparently sign PubSub requests
Instance Attribute Summary collapse
-
#oauth_consumer ⇒ Object
Returns the value of attribute oauth_consumer.
-
#oauth_options ⇒ Object
Returns the value of attribute oauth_options.
-
#oauth_token ⇒ Object
Returns the value of attribute oauth_token.
-
#pubsubjid ⇒ Object
Returns the value of attribute pubsubjid.
Instance Method Summary collapse
-
#send_with_id(iq) ⇒ Object
enhanced #send_with_id method that signs stanzas.
Instance Attribute Details
#oauth_consumer ⇒ Object
Returns the value of attribute oauth_consumer.
5 6 7 |
# File 'lib/xmpp4r/pubsub/helper/oauth_service_helper.rb', line 5 def oauth_consumer @oauth_consumer end |
#oauth_options ⇒ Object
Returns the value of attribute oauth_options.
5 6 7 |
# File 'lib/xmpp4r/pubsub/helper/oauth_service_helper.rb', line 5 def @oauth_options end |
#oauth_token ⇒ Object
Returns the value of attribute oauth_token.
5 6 7 |
# File 'lib/xmpp4r/pubsub/helper/oauth_service_helper.rb', line 5 def oauth_token @oauth_token end |
#pubsubjid ⇒ Object
Returns the value of attribute pubsubjid.
5 6 7 |
# File 'lib/xmpp4r/pubsub/helper/oauth_service_helper.rb', line 5 def pubsubjid @pubsubjid end |
Instance Method Details
#send_with_id(iq) ⇒ Object
enhanced #send_with_id method that signs stanzas
8 9 10 11 12 13 14 15 |
# File 'lib/xmpp4r/pubsub/helper/oauth_service_helper.rb', line 8 def send_with_id(iq) if iq.first_element("pubsub") oauth = OAuthServiceHelper.create_oauth_node(self.jid, self.pubsubjid, self.oauth_consumer, self.oauth_token, self.) iq.pubsub.add(oauth) end super(iq) end |