Skip to main content
Version: 9.2605.x.x RR

SecToken

Class function

ch.nevis.session.SecToken.new(sectokenAsXml)

Instantiates a SecToken from the XML string passed as parameter.

Sample:

sectoken = ch.nevis.session.SecToken.new(req:getHeader("isiwebsectoken"))

Object methods

sectoken:getVersion()

Returns the version of the SecToken as a string.

Sample:

version = sectoken:getVersion()

sectoken:getAlgorithm()

Returns the algorithm of the SecToken.

Sample:

local algorithm = sectoken:getAlgorithm()

sectoken:getUserId()

Returns the user ID of the SecToken as a string.

Sample:

local userId = sectoken:getUserId()

sectoken:getUserRoles()

Returns the user roles of the SecToken as a string.

Sample:

userRoles = sectoken:getUserRoles()

sectoken:getSessionId()

Returns the session ID of the SecToken as a string.

Sample:

local sessionId = sectoken:getSessionId()

sectoken:getEntryId()

Returns the entry ID of the SecToken as a string.

Sample:

local entryId = sectoken:getEntryId()

sectoken:getEsAuthId()

Returns the EsAuth ID of the SecToken as a string.

Sample:

local esauthId = sectoken:getEsAuthId()

sectoken:getClientId()

Returns the client ID of the SecToken as a string.

Sample:

local clientId = sectoken:getClientId()

sectoken:getAuthStrength()

Returns the authentication strength of the SecToken as a string.

Sample:

local authStrength = sectoken:getAuthStrength()

sectoken:getDomain()

Returns the domain of the SecToken as a string.

Sample:

local domain = sectoken:getDomain()

sectoken:getSignTime()

Returns the time when the token was signed, in epoch seconds (seconds since 1970-01-01 00:00:00 UTC).

Sample:

local signTime = sectoken:getSignTime()

sectoken:getTimeToLive()

Returns the number of seconds until the SecToken expires.

Sample:

local timeToLive = sectoken:getTimeToLive()

sectoken:getFingerPrint()

Returns the fingerprint of the SecToken as a string.

Sample:

local fingerPrint = sectoken:getFingerPrint()