A base class for handling User Login and Registration

Hierarchy

  • AuthenticationClient

Constructors

Properties

Methods

Constructors

  • Constructor for the AuthenticationClient

    Parameters

    • http: HttpClient

      HttpClient for sending and receiving HTTP requests

    Returns AuthenticationClient

Properties

headers: {
    content-type: string;
} = ...

Headers to be applied to any HTTP requests

Type declaration

  • content-type: string
http: HttpClient

HttpClient for sending and receiving HTTP requests

Methods

  • Creates a User object with email and password from passed parameters and sends User data to the '/login' endpoint of the server

    Returns

    Observable of the HTTP responce

    Parameters

    • email: string

      User email address

    • password: string

      User password

    Returns Observable<any>

  • Creates a User object using passed parameters. Send User data in a POST request to the server '/new-user' endpoint

    Parameters

    • firstName: string

      User first name

    • lastName: string

      User last name

    • email: string

      User email address

    • password: string

      User password

    • kNumber: string

      User Knumber

    Returns Observable<any>

Generated using TypeDoc