Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IAuthenticationService

Interface that describes how injectable Authentication Services should work

Hierarchy

  • IAuthenticationService

Implemented by

Index

Properties

CurrentState

CurrentState: LoginState

Represents the actual LoginState. Recommended to use the State's BehaviorSubject's .Value

CurrentUser

CurrentUser: string

State

State: Observable<LoginState>

This observable is a public API for subscribing the current state and it's changes. Recommended to work with a private BehaviorSubject in the backgroud.

Methods

CheckForUpdate

  • CheckForUpdate(): Observable<boolean>

GetOauthProvider

  • GetOauthProvider<T>(providerType: object): T

HandleAuthenticationResponse

Login

  • Login(username: string, password: string): Observable<boolean>
  • Tries to log in with a specified credentials. Updates the current state subject based on the login response.

    Parameters

    • username: string

      The user's name

    • password: string

      The user's password

    Returns Observable<boolean>

    that indicates if the login was successful

Logout

  • Logout(): Observable<boolean>

SetOauthProvider

  • SetOauthProvider<T>(provider: T): void

Generated using TypeDoc