6.1.1.2.1.12. linotp.controllers.testing module

testing controller - for testing purposes

class linotp.controllers.testing.TestingController(*args, **kw)[source]

Bases: linotp.lib.base.BaseController

The linotp.controllers are the implementation of the web-API to talk to the LinOTP server.

https://server/testing/<functionname>

The functions are described below in more detail.

autosms()[source]

This function is used to test the autosms policy

method:
testing/autosms
arguments:
user - username / loginname realm - additional realm to match the user to a useridresolver
returns:
JSON response
http2sms()[source]

This function simulates an HTTP SMS Gateway.

method:
test/http2sms

arguments:

  • sender, absender
  • from, von
  • destination, ziel
  • password, passwort
  • from, von
  • text
  • account
  • api_id
returns:

As this is a test controller, the response depends on the input values.

account = 5vor12, sender = legit
-> Response Success: “200” (Text)
account = 5vor12, sender = <!legit>
-> Response Failed: “Failed” (Text)
account = clickatel, username = legit
-> Response Success: “ID <Random Number>” (Text)
account = clickatel, username = <!legit>
-> Response Success: “FAILED” (Text)