Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.

public final class DefaultCsrfToken

  1. Object
  2. DefaultCsrfToken

ImplementsCsrfToken

A CsrfToken that is its three values.

Constructors

public DefaultCsrfToken(String headerName, String parameterName, String token)

Methods

public String getHeaderName()The header a script sends the token in: X-CSRF-TOKEN.
public String getParameterName()The form field a page sends the token in: _csrf.
public String getToken()The value to send.

Inherited methods

Constructor details

DefaultCsrfToken

public DefaultCsrfToken(String headerName, String parameterName, String token)

Method details

getHeaderName

public String getHeaderName()
The header a script sends the token in: X-CSRF-TOKEN.

getParameterName

public String getParameterName()
The form field a page sends the token in: _csrf.

getToken

public String getToken()
The value to send. From a controller parameter it is masked: different in every response, and every one of them accepted.