Skip to main content
Version: 1.8.x.x LTS

DeviceCookieAuthState

As a precondition to use the Device Recognition module in nevisAdapt, configure the AuthState DeviceCookieAuthState in nevisAuth. For each login request, this AuthState checks whether a device cookie exists. If not, the AuthState creates a device cookie and sends this persistent device cookie with the request.

The technical name of the AuthState is ch.nevis.detect.authstate.DeviceCookieAuthState. Integrate it in your login workflow, such that it is invoked at the beginning of the flow.

The following table lists the configuration properties of the AuthState.

NameType/unitDefaultExampleDescription
securebooleantrueFlag for the cookie attribute secure.
httpOnlybooleantrueFlag for the cookie attribute httpOnly.
cookieNamestringNADCName of the device cookie. See also the configuration attribute nevisadapt.cookie.name of the nevisAdapt plug-in.
cookieDomainstringnevis.chDomain of the device cookie.
cookiePathstring/Path of the device cookie.
maxAgeInDaysint365Maximum age (in days) of the device cookie.
Example configuration
 <AuthState class="ch.nevis.detect.authstate.DeviceCookieAuthState" final="false" name="sso_authstate-adapt_DeviceCookie">
<ResultCond name="error" next="sso_authstate-realm_Authentication_Failed"/>
<ResultCond name="ok" next="sso_authstate-adapt_NevisAdapt"/>
<Response value="AUTH_ERROR"/>
<property name="cookieName" value="DEVICE_COOKIE"/>
<property name="cookieDomain" value="nevis.ch"/>
<property name="cookiePath" value="/"/>
<property name="maxAgeInDays" value="30"/>
</AuthState>