setVisitorIdToken(idToken)

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

With Scrivito SDK 1.41.0 and later, using this method this is no longer recommend. Instead, use Visitor Authentication with IAM.

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.

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