service: Intercept

ngToken. Intercept

Intercept()

Interceptor that adds the stored token to requests and broadcasts 401 and 403 errors

Source:

Methods

request()

Checks to see if the token exists. If so, adds it to the Autorization header using the Bearer scheme.

Source:

responseError()

Checks errors for a 401 or 403 status and broadcasts and event accordingly. Could be used to redirect users or invalidate tokens on authentication or authorization errors.

Source: