Unauthenticated Extensions
It can be useful to call your service outside of an active online banking session. One way to do this is to use an Ardent Extension, which is useful for building your own API endpoints that have access to the Q2 database’s data.
However, that leaves you in charge of building your own frontend from scratch. Using the Tecton framework to inherit themes, draw appropriately styled and feature-rich web components, etc is a substantial amount of work. As a middle ground, we support Unauthenticated Tecton based extensions.
If you select the Unauthenticated
option when creating your Online extension, you should see a IS_UNAUTHENTICATED
flag turned on in your extension.py file.
If you are changing an existing Authenticated extension to work Unauthenticated, you can manually set this by adding
IS_UNAUTHENTICATED = True
to your extension.py file. By setting that flag to true, the next time you run your server with q2 run
, you will be
greeted with a prompt guiding you through migrating your Authenticated extension to an Unauthenticated one:
SpamAndEggs extension - Authentication choice in Class must match Tecton config
Class is unauth: True
Tecton Config is unauth: False
Apply fixes automatically? [Y/n]
By selecting Y (the default) your extension’s config file (configuration/SpamAndEggs.py in this case) will be updated appropriately for unauthenticated traffic:
FEATURE = {
"modules": {
"Main": {
...
"url": "./sdk/{featureName}",
...
}
}
}
Also, you may be prompted to insert a row into the Q2_DataFeed
table:
Datafeed must be installed (and stack bounced) if extension is unauthenticated
Apply fixes automatically? [Y/n]
Again, a quick affirmative installs the Db row and bounces your stack.
Note
In future versions of the product, we expect this bounce to go away and be dynamically resourced
Restart your server with q2 run
and you are ready to go. Navigating to uux.aspx#/unauth/extension/<yourextension>/Main
will display your extension even logged out!
Example here shown for a sandbox stack named sdkteam
:
