Home Manual Reference Source
public class | source

DummyFlow

Extends:

OAuth → DummyFlow

Dummy flow for when the token should be available in the cache and no attempt at authentication should be made.

Constructor Summary

Public Constructor
public

constructor(clientId: String, scopes: Array<String>)

Method Summary

Public Methods
public

authenticate(): Promise<OAuthToken>>

Authenticate

Inherited Summary

From class OAuth
public get

If the current instance has a valid token

public
public

host: *

public

path: *

public

scopes: *

public

token: *

public abstract

Authenticate

public

forget()

Forget the current session Empty the session token store and forget the api token

public

importToken(token: String, type: String, expires: Date | Number, scopes: Array<string>)

Manually import OAuthToken, usefull for debugging

public

async logout()

Invalidates the session token

Public Constructors

public constructor(clientId: String, scopes: Array<String>) source

Override:

OAuth#constructor

Params:

NameTypeAttributeDescription
clientId String
  • optional
  • default:

OAuth client id

scopes Array<String>

A list of required scopes

Public Methods

public authenticate(): Promise<OAuthToken>> source

Authenticate

Override:

OAuth#authenticate

Return:

Promise<OAuthToken>>

token

Throw:

OAuthError