Options
All
  • Public
  • Public/Protected
  • All
Menu

Module background/api/auth

Index

Functions

  • getAccessTokenWithRefreshToken(): void
  • It gets the refresh token from the Redux store, sends it to the backend, and if the backend returns a new access token, it sets the access token in the Redux store and gets the user data from the backend

    Returns void

  • getOwnUserData(userId: number): void
  • It takes a username and password, hashes the password, and sends it to the backend. If the backend returns a valid response, it stores the refresh token in the Redux store and in a cookie

    Parameters

    • userName: string

      The username of the user

    • password: string

      The password of the user

    • stayLoggedIn: boolean

    Returns Promise<BackendLoginData>

    A promise that resolves to a BackendLoginData object.

  • logout(): void
  • setAuthHeaderToAxios(accessToken: string): void

Generated using TypeDoc version 0.22.15, the 4/20/2022