AccessTokenLifeTime Property

General info

Label

Access Token Lifetime

Description

The period in seconds an access token remains valid after being issued. The client application is expected to refresh or acquire a new access token after the token has expired.

Data type

Int32

Default value

1200

Type

Regular

Code

2824

Symbolic name

MODEL_PROP_ACCESSTOKENLIFETIME

Lua access code

syslib.model.properties.AccessTokenLifeTime

Available since

1.34

Parent properties

WebAPIAuthentication

Attributes

Name Tooltip
PROP_CONFIGURABLE The property is configurable and can be changed with DataStudio and the various inmation APIs.
PROP_VISIBLE The property is visible in DataStudio and can be read by the inmation APIs.
PROP_HAS_DEFAULT The property has a default value as standard.
PROP_UNIT The property has an engineering unit.

Examples

Read from or write to the AccessTokenLifeTime property.

  • Lua

  • C#

-- Read from the AccessTokenLifeTime
syslib.getvalue("<OBJECT FULL PATH>.WebAPIAuthentication.AccessTokenLifeTime")

-- Write to the AccessTokenLifeTime
syslib.setvalue("<OBJECT FULL PATH>.WebAPIAuthentication.AccessTokenLifeTime", 1200)
TcpConfig tcpcfg = new TcpConfig() { HostNameOrIp = "localhost", Port = 6512 };
SecurityCredentials sc = new SecurityCredentials() { ProfileName = "<username>", Password = "<password>" };
StatelessInterface sli = new StatelessInterface(tcpcfg);

// Read from the AccessTokenLifeTime
Result result = sli.ReadValue(sc, new ReadItem("<OBJECT FULL PATH>.WebAPIAuthentication.AccessTokenLifeTime"));
// Write to the AccessTokenLifeTime
Result result = sli.WriteValue(sc, new WriteItem(1200, "<OBJECT FULL PATH>.WebAPIAuthentication.AccessTokenLifeTime"));