Options
All
  • Public
  • Public/Protected
  • All
Menu

Module orm_functions/session_key

Index

Functions

  • addSessionKey(loginUserId: number, key: string, date: Date): Promise<session_keys>
  • adds session key to loginUser

    Parameters

    • loginUserId: number

      the id of the loginUser for whom we are adding a session key

    • key: string

      the new session key

    • date: Date

    Returns Promise<session_keys>

    the new record in the database in a promise

  • checkSessionKey(key: string): Promise<null | { login_user_id: number }>
  • checks if the session key exists

    Parameters

    • key: string

    Returns Promise<null | { login_user_id: number }>

    the loginUser associated with the key in a promise if the keys is valid otherwise an error in a promise

  • refreshKey(key: string, date: Date): Promise<session_keys>
  • removeAllKeysForLoginUserId(loginUserId: number): Promise<BatchPayload>
  • Parameters

    • loginUserId: number

      the id of the loginUser whose session keys we want to remove

    Returns Promise<BatchPayload>

    a promise with the number of deleted records

  • removeAllKeysForUser(key: string): Promise<{ count: number }>
  • deletes all session keys of the user that has the given key

    Parameters

    • key: string

      a key of a user whose keys we want to delete

    Returns Promise<{ count: number }>

    the number of deleted records in a promise

Generated using TypeDoc