Session

public protocol Session : CustomStringConvertible

A session connects a user to the server.

  • UTC timestamp when the session was restored.

    Declaration

    Swift

    var createdAt: Int
  • UTC timestamp when the session expires.

    Declaration

    Swift

    var expiresAt: Int
  • The handle (nickname) of the user.

    Declaration

    Swift

    var handle: String
  • The ID of the user.

    Declaration

    Swift

    var userID: String
  • The session token returned by the server after register or login.

    Declaration

    Swift

    var token: String
  • Declaration

    Swift

    func isExpired(currentTimeSince1970 : TimeInterval) -> Bool

    Parameters

    currentTimeSince1970

    The current time in milliseconds to compare with token.

    Return Value

    True if the session has expired.