Session interface for maintaining cookie and protocol information

export
interface

  ISession

### Hierarchy

- ISession

## Index

### Properties

- _authCache
- authTypeOrder
- base64EncodedAuth
- basePath
- cert
- certKey
- checkServerIdentity
- hostname
- passphrase
- password
- port
- protocol
- proxy
- rejectUnauthorized
- requestCompletionTimeout
- requestCompletionTimeoutCallback
- secureProtocol
- serverCertificate
- socketConnectTimeout
- storeCookie
- strictSSL
- tokenType
- tokenValue
- type
- user

## Properties

### Optional _authCache

_authCache: IAuthCache

- Defined in @zowe/imperative/src/rest/src/session/doc/ISession.ts:202

The _authCache property contains a cache of credentials which are available for authentication. It also contains properties related to whether the user supplied the authentication order or whether we are using a default order.

The _authCache property is created and managed by Zowe SDK functions. Consuming applications should not modify the contents of the _authCache property.

memberof

  ISession

### Optional authTypeOrder

authTypeOrder: SessConstants.AUTH_TYPE_CHOICES[]

- Defined in @zowe/imperative/src/rest/src/session/doc/ISession.ts:189

Specifies the order of precedence for using different authentication types in this session. The order in the array determines which credential type is preferred. The type in authTypeOrder[0] is used first, authTypeOrder[1] second, etc. Values are specified using SessConstants.AUTH_TYPE_XXX values.

The authTypeOrder property can be specified by the end user and is used by Zowe SDK functions.

memberof

  ISession

### Optional base64EncodedAuth

base64EncodedAuth: string

- Defined in @zowe/imperative/src/rest/src/session/doc/ISession.ts:95

Base 64 encoded authentication materials created by base 64 encoding: Basic :

memberof

  ISession

### Optional basePath

basePath: string

- Defined in @zowe/imperative/src/rest/src/session/doc/ISession.ts:71

The base path (or first part) of the resources that we will access. It is used to specify the first part of the resource in a URL that points to any API mediation layer, gateway, or router used at a site to dispatch web requests to services that are managed by that gateway. It is pre-pended to the resource path of the underlying service. When not supplied, or is an empty string we use the the resource path of the underlying service directly.

memberof

  ISession

### Optional cert

cert: string

- Defined in @zowe/imperative/src/rest/src/session/doc/ISession.ts:124

The file path to the client certificate to use for authentication

memberof

  ISession

### Optional certKey

certKey: string

- Defined in @zowe/imperative/src/rest/src/session/doc/ISession.ts:131

The file path to the client certificate's key to use for authentication

memberof

  ISession

### Optional checkServerIdentity

checkServerIdentity: (host: string, cert: object) => Error | undefined

- Defined in @zowe/imperative/src/rest/src/session/doc/ISession.ts:159

todo

memberof

  ISession

#### Type declaration

- - (host: string, cert: object): Error | undefined

  - #### Parameters

    - ##### host: string

    - ##### cert: object

    #### Returns Error | undefined

### Optional hostname

hostname: string

- Defined in @zowe/imperative/src/rest/src/session/doc/ISession.ts:28

Host to get data from, not including http(s) from a URL, e.g. jsonplaceholder.typicode.com

memberof

  ISession

### Optional passphrase

passphrase: string

- Defined in @zowe/imperative/src/rest/src/session/doc/ISession.ts:138

The passphrase used to access the client certificate, if in PFX format

memberof

  ISession

### Optional password

password: string

- Defined in @zowe/imperative/src/rest/src/session/doc/ISession.ts:51

Password

memberof

  ISession

### Optional port

port: number

- Defined in @zowe/imperative/src/rest/src/session/doc/ISession.ts:37

Port to obtain data from 80 is the default for http 443 is the default 443 for https

memberof

  ISession

### Optional protocol

protocol: SessConstants.HTTP_PROTOCOL_CHOICES

- Defined in @zowe/imperative/src/rest/src/session/doc/ISession.ts:58

Currently only HTTPS is supported

memberof

  ISession

### Optional proxy

proxy: ProxyVariables

- Defined in @zowe/imperative/src/rest/src/session/doc/ISession.ts:211

Specifies external proxy settings values will override environment variable proxy settings

memberof

  ISession

### Optional rejectUnauthorized

rejectUnauthorized: boolean

- Defined in @zowe/imperative/src/rest/src/session/doc/ISession.ts:117

The following options map to TLS options available within the node.js TLS APIs, please see the official Node.js documentation for these fields

memberof

  ISession

### Optional requestCompletionTimeout

requestCompletionTimeout: number

- Defined in @zowe/imperative/src/rest/src/session/doc/ISession.ts:227

Specifies the number of milliseconds to wait for the request to complete

memberof

  ISession

### Optional requestCompletionTimeoutCallback

requestCompletionTimeoutCallback: () => void

- Defined in @zowe/imperative/src/rest/src/session/doc/ISession.ts:235

The callback if the request completion timeout occurs. Must be synchronous.

memberof

  ISession

#### Type declaration

- - (): void

  - #### Returns void

### Optional secureProtocol

secureProtocol: string

- Defined in @zowe/imperative/src/rest/src/session/doc/ISession.ts:166

Default is SSLv23_method

memberof

  ISession

### Optional serverCertificate

serverCertificate: string

- Defined in @zowe/imperative/src/rest/src/session/doc/ISession.ts:145

todo

memberof

  ISession

### Optional socketConnectTimeout

socketConnectTimeout: number

- Defined in @zowe/imperative/src/rest/src/session/doc/ISession.ts:219

Specifies the number of milliseconds to wait for the initial socket connection to be established

memberof

  ISession

### Optional storeCookie

storeCookie: boolean

- Defined in @zowe/imperative/src/rest/src/session/doc/ISession.ts:175

Decide whether or not to store a returned cookie. Only applies to certificates for now.

memberof

  ISession

### Optional strictSSL

strictSSL: boolean

- Defined in @zowe/imperative/src/rest/src/session/doc/ISession.ts:152

see node.js api

memberof

  ISession

### Optional tokenType

tokenType: string

- Defined in @zowe/imperative/src/rest/src/session/doc/ISession.ts:102

Type of token in `tokenValue`, e.g. LTPA2

memberof

  ISession

### Optional tokenValue

tokenValue: string

- Defined in @zowe/imperative/src/rest/src/session/doc/ISession.ts:109

Token value of type `tokenType`

memberof

  ISession

### Optional type

type: SessConstants.AUTH_TYPE_CHOICES

- Defined in @zowe/imperative/src/rest/src/session/doc/ISession.ts:87

Type of authentication, none is default "none" - no authorization header is used "basic" - use basic auth for every request "bearer" - use bearer auth for every request. Indicates use token value provided. "token" - use cookie auth for every request. Indicates use token value provided and check for timeout / expiration if not token is provided, basic auth is used and the tokenType is obtained from the cookie header and stored as a token value to be used on subsequent requests

memberof

  ISession

### Optional user

user: string

- Defined in @zowe/imperative/src/rest/src/session/doc/ISession.ts:44

User name for logging in

memberof

  ISession

Generated using TypeDoc