Options
All
  • Public
  • Public/Protected
  • All
Menu

Class JWTAuthService

Service for managing JWT Auth Token from dotCMS Site/Host

Hierarchy

  • JWTAuthService

Index

Constructors

constructor

Properties

Private http

http: Http

Private loggerService

loggerService: LoggerService

Private notificationService

notificationService: NotificationService

Private settingsStorageService

settingsStorageService: SettingsStorageService

Methods

Private doPostAuth

  • doPostAuth(siteUrl: string, data: any): Observable<Response>

Private extractJWT

  • extractJWT(res: Response): string

getJWT

  • getJWT(siteURL: string, username: string, password: string): Observable<string>
  • Will POST to the dotCMS to retrieve a dotCMS Auth Token

    Parameters

    • siteURL: string

      Site/Host of dotCMS

    • username: string
    • password: string

    Returns Observable<string>

    String return for the token

Private handleError

  • handleError(error: any): ErrorObservable

login

  • login(siteURL: string, username: string, password: string): Observable<string>
  • Will login and save the Auth Token to local storage

    Parameters

    • siteURL: string
    • username: string
    • password: string

    Returns Observable<string>

Generated using TypeDoc