AuthenticationRequiredError class

Error used to enforce authentication after trying to retrieve a token silently.

Extends

Error

Constructors

AuthenticationRequiredError(AuthenticationRequiredErrorOptions)

Properties

getTokenOptions

The options passed to the getToken request.

scopes

The list of scopes for which the token will have access.

Inherited Properties

message
name
prepareStackTrace

Optional override for formatting stack traces

See https://v8.dev/docs/stack-trace-api#customizing-stack-traces

stack
stackTraceLimit

Inherited Methods

captureStackTrace(object, Function)

Create .stack property on a target object

Constructor Details

AuthenticationRequiredError(AuthenticationRequiredErrorOptions)

new AuthenticationRequiredError(options: AuthenticationRequiredErrorOptions)

Parameters

options
AuthenticationRequiredErrorOptions

Optional parameters. A message can be specified. The GetTokenOptions of the request can also be specified to more easily associate the error with the received parameters.

Property Details

getTokenOptions

The options passed to the getToken request.

getTokenOptions?: GetTokenOptions

Property Value

scopes

The list of scopes for which the token will have access.

scopes: string[]

Property Value

string[]

Inherited Property Details

message

message: string

Property Value

string

Inherited From Error.message

name

name: string

Property Value

string

Inherited From Error.name

prepareStackTrace

Optional override for formatting stack traces

See https://v8.dev/docs/stack-trace-api#customizing-stack-traces

static prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

Property Value

(err: Error, stackTraces: CallSite[]) => any

Inherited From Error.prepareStackTrace

stack

stack?: string

Property Value

string

Inherited From Error.stack

stackTraceLimit

static stackTraceLimit: number

Property Value

number

Inherited From Error.stackTraceLimit

Inherited Method Details

captureStackTrace(object, Function)

Create .stack property on a target object

static function captureStackTrace(targetObject: object, constructorOpt?: Function)

Parameters

targetObject

object

constructorOpt

Function

Inherited From Error.captureStackTrace