Pings

A Ping is a message sent through NewAuth to a group of people registered. It can be sent over XMPP or Pushbullet for example.

XMPP Pinger

NewAuth can send its pings to a Jabber server. To enable this pinger, add newauth.plugins.ping.xmpp.XMPPPinger to the PINGERS setting.

Pushbullet Pinger

NewAuth can send its pings to Pushbullet, a notification web service that has applications for Chrome, Android, iOS and more.

To enable this pinger, add newauth.plugins.ping.pushbullet.PushbulletPinger to the PINGERS setting.

Create your own Pinger

You would need to subclass and implement the newauth.plugins.ping.Pinger.

class newauth.plugins.ping.Pinger(app=None)[source]

Pinger base class to create a new pinger. Works like a plugin.

description = ''

Description to be displayed, supports Markdown.

disable(user, configuration)[source]

Called when disabling the pinger.

You can do additional steps before NewAuth disable this pinger for the user.

Feel free to flash messages through Flask’s flash.

configuration will be serialized, saved and tied to the user.

Returns:Return the configuration if successful or False
display_name = ''

Pinger name to be displayed.

enable(user, configuration)[source]

Called when enabling the pinger after the form has been validated.

Feel free to flash messages through Flask’s flash.

configuration will be serialized, saved and tied to the user.

Returns:Return True, False, or a dict for more action. See pingers for more info.
enabled(user)[source]

Test if the user has the pinger enabled and configured.

Return type:boolean
get_form(user_config)[source]

Return a WTForm to display on the pinger settings page or None if no configuration needed. :param user_config: :return:

immutable = False

Can this pinger be disabled ?

init_app(app)[source]

Called when the application starts, use to check for settings or register signals :param app: :return:

name = ''

Pinger name used for configuration storage and in other various places.

save_configuration(user, configuration, form)[source]

Called when saving the plugin settings and the form has been validated.

Feel free to flash messages through Flask’s flash.

configuration will be serialized, saved and tied to the user.

Returns:Return the configuration if successful or False
send_ping(ping)[source]

Send the ping to the users.