setVisitorIdToken(idToken)

Provides a visitor identity token to Scrivito causing restricted content to become available.

Scrivito.setVisitorIdToken must only be called if visitor authenti­cation has been switched on before using the visitorAuthentication configuration key in Scrivito.configure. Otherwise, an error is thrown.

Copy
var idToken = "eyJhbGciOiJI...U1_V-Ra7XclS";
Scrivito.setVisitorIdToken(idToken);

The passed-in token is checked for validity, meaning that restricted content will be made available only if the token is valid.

Params

  • idToken (String) – The identity token of the authenticated visitor.

See also