Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface WAKConnectionSession

Hierarchy

  • WAKConnectionSession

Index

Properties

ID

ID: String

Describes the session internal ID.

expiration

expiration: Date

Describes the session expiration date.

lifeTime

lifeTime: Number

Describes the session lifetime (default: 3600 seconds).

storage

Describes the user session storage.

user

user: User

Describes the session user.

Methods

belongsTo

  • belongsTo(group: String): Boolean
  • belongsTo(group: Group): Boolean
  • Check if the session belongs to the group.

    Parameters

    • group: String

    Returns Boolean

    Returns true if the user belongs to the group, false otherwise.

  • Check if the session belongs to the group.

    Parameters

    Returns Boolean

    Returns true if the user belongs to the group, false otherwise.

checkPermission

  • checkPermission(group: String): Boolean
  • checkPermission(group: Group): Boolean
  • Check if the current session belongs to the group.

    throws

    An error if the session does not belongs to the group

    Parameters

    • group: String

    Returns Boolean

    true if the session belongs to the group, throws an error otherwise.

  • Check if the current session belongs to the group.

    throws

    An error if the session does not belongs to the group

    Parameters

    Returns Boolean

    true if the session belongs to the group, throws an error otherwise.

forceExpire

  • forceExpire(): void

promoteWith

  • promoteWith(group: Group): Number
  • promoteWith(group: String): Number

unPromote

  • unPromote(token: Number): void
  • Stops the temporary promotion set for the current session using the promoteWith() method.

    Parameters

    • token: Number

    Returns void