Class: Session

Session(jwt)

Represents a login-session and contains the JSON Web Token which where provided upon a successful login.

Constructor

new Session(jwt)

Creates a new instance of Session.

Parameters:
Name Type Description
jwt String

The JWT received upon successful login.

Source:

Methods

getAuth()

Returns a boolean indicating whether the session is authenticated.

Source:
Returns:

true if authenticated, false otherwise.

getJwt()

Returns the JSON Web Token of the session.

Source:
Returns:

JWT authentication Token.

setAuth(auth)

Set the boolean indicating whether the session is authenticated or not.

Parameters:
Name Type Description
auth Boolean

true if authenticated, false otherwise.

Source:

setJwt(jwt)

Set the JSON Web Token of the session.

Parameters:
Name Type Description
jwt String

The received JWT.

Source: