DigiD LogOff Example

This example resembles the sxml logic for a DigiD logoff page. First sessions are enabled using the viper session.enable(), since DigiD requires a session.

Then the digid.logoff() viper is called to end the DigiD session. Internally, the DigiD token and session variables are removed as well as setting the DigiD cookie to expired.

Then the user is redirected to a status page (item with code STATUSINFO), passing DIGID_LOGOFF as status parameter.

Smartsite SXML CopyCode image Copy Code
{session.enable()}
{digid.logoff()}
{request.transfer(url.addparameter(STATUSINFO,status,'DIGID_LOGOFF'))}