Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AbstractSession

The API session object, serves as the base for sessions and contains the fields that are required by most API calls (hostname, port, credentials, etc).

export
abstract

Hierarchy

Index

Constructors

constructor

Properties

Private mISession

mISession: ISession

Private mLog

mLog: Logger

Logging object

Static Readonly BASIC

BASIC: RegExp = /^Basic/ig

Regex to extract basic from base64 encoded auth

static
memberof

AbstractSession

Static Readonly BASIC_PREFIX

BASIC_PREFIX: string = "Basic "

Basic auth prefix

static
memberof

AbstractSession

Static Readonly BEARER_PREFIX

BEARER_PREFIX: string = "Bearer "

Bearer auth prefix

static
memberof

AbstractSession

Static Readonly DEFAULT_BASE_PATH

DEFAULT_BASE_PATH: "" = ""

Default base path. Our empty string means that we do not use an API mediation layer base path at the beginning of every resource URL.

static
memberof

AbstractSession

Static Readonly DEFAULT_HTTPS_PORT

DEFAULT_HTTPS_PORT: 443 = 443

Default https port 443

static
memberof

AbstractSession

Static Readonly DEFAULT_HTTP_PORT

DEFAULT_HTTP_PORT: 80 = 80

Default http port 80

static
memberof

AbstractSession

Static Readonly DEFAULT_PORT

DEFAULT_PORT: 443 = AbstractSession.DEFAULT_HTTPS_PORT

Default https port

static
memberof

AbstractSession

Static Readonly DEFAULT_PROTOCOL

DEFAULT_PROTOCOL: "https" = SessConstants.HTTPS_PROTOCOL

Default protocol

static
memberof

AbstractSession

Static Readonly DEFAULT_REJECT_UNAUTHORIZED_SETTING

DEFAULT_REJECT_UNAUTHORIZED_SETTING: true = true

Default reject unauthorized

static
memberof

AbstractSession

Static Readonly DEFAULT_SECURE_PROTOCOL

DEFAULT_SECURE_PROTOCOL: "SSLv23_method" = "SSLv23_method"

Default SSL method

static
memberof

AbstractSession

Static Readonly DEFAULT_STRICT_SSL

DEFAULT_STRICT_SSL: true = true

Default strict ssl setting

static
memberof

AbstractSession

Static Readonly DEFAULT_TYPE

DEFAULT_TYPE: "none" = SessConstants.AUTH_TYPE_NONE

Default session type

static
memberof

AbstractSession

Static Readonly HTTPS_PROTOCOL

HTTPS_PROTOCOL: "https" = SessConstants.HTTPS_PROTOCOL

https protocol

deprecated

Use SessConstants.HTTPS_PROTOCOL

Static Readonly HTTP_PROTOCOL

HTTP_PROTOCOL: "http" = SessConstants.HTTP_PROTOCOL

http protocol

deprecated

Use SessConstants.HTTP_PROTOCOL

Static Readonly TYPE_BASIC

TYPE_BASIC: "basic" = SessConstants.AUTH_TYPE_BASIC

Session type property value for no authentication

deprecated

Use SessConstants.AUTH_TYPE_BASIC

Static Readonly TYPE_BEARER

TYPE_BEARER: "bearer" = SessConstants.AUTH_TYPE_BEARER

Session type property value for bearer token authentication

deprecated

Use SessConstants.AUTH_TYPE_BEARER

Static Readonly TYPE_NONE

TYPE_NONE: "none" = SessConstants.AUTH_TYPE_NONE

Session type property value for no authentication

deprecated

Use SessConstants.AUTH_TYPE_NONE

Static Readonly TYPE_TOKEN

TYPE_TOKEN: "token" = SessConstants.AUTH_TYPE_TOKEN

Session type property value for cookie token authentication, which uses a named token type.

deprecated

Use SessConstants.AUTH_TYPE_TOKEN

Accessors

ISession

Methods

Private buildSession

storeCookie

  • storeCookie(cookie: any): void

Static getBase64Auth

  • getBase64Auth(user: string, password: string): string

Static getPasswordFromAuth

  • getPasswordFromAuth(auth: string): string

Static getUsernameFromAuth

  • getUsernameFromAuth(auth: string): string

Generated using TypeDoc