HeaderBasedAuthenticationTag

If you put your OnPrem Turnkey installation under a generic catch-all authentication umbrella (like Shibboleth), you may want to make use of that externally provided identity in your Turnkey application.

The normal scenario is that the authentication umbrella that makes sure your user is identified before ever reaching your application adds a header to each call you get.

To make use of such a header, you can now configure your installation like this:

In TurnkeySettings.xml add this:

<HeaderBasedAuthenticationTag>The Header you want to catch</HeaderBasedAuthenticationTag>

The value of that header will then be used as the User-identity (email) for SysUser in your model.

If the value is only a reference and the user info must be looked up elsewhere, you can do so by creating a serverside job that does something like this:

  • Act on all: SysUser.allinstances->select(not ReferenceIsResolved)
  • For each: Resolve the reference (maybe by calling external web-service with RESTGet) and set ReferenceIsResolved:=true

(ReferenceIsResolved is a new property you must add to SysUser in your model)

After Log out / Log off

You can add this tag to the TurnkeySettings.xml file to influence what URL to go to after logging out:

<AfterLogOutUrl>https://www.google.se/</AfterLogOutUrl>

If this setting is found, it should show up early after the application starts in the log file like this:

2018-10-18 22:58:24,045 [8] INFO StreamingAppGenericAPIAndControllers.LogUsageTurnkey - OptionalAfterLogOutUrl set to https://www.google.se/<br/>

(This scenario is used by Finansinspektionen - BankId - Shibboleth)

Special handling of Clicking on the Logged-in User in the Header

When you need the click on the user name shown in the header to take you elsewhere than Account/Manage, make it go to named ViewModel instead:

<CurrentUserViewModel>CurrentUserInfo</CurrentUserViewModel>

If this setting is found, it should show up early after the app starts in the log file like this:

2018-10-18 23:02:20,551 [6] INFO StreamingAppGenericAPIAndControllers.LogUsageTurnkey - ManageUserUrl set to https://localhost:44300/Turnkey/AngularApp#/CurrentUserInfo/$null$<br/>
This page was edited 149 days ago on 06/17/2024. What links here