Class: BasicProvider

BasicProvider(connection)

The Authentication Provider for HTTP Basic.

Constructor

new BasicProvider(connection)

Creates a new BasicProvider instance to authenticate using HTTP Basic.

Parameters:
Name Type Description
connection Connection

A Connection object representing an established connection to an openEO back-end.

Source:

Extends

Members

(protected) connection :Connection

Type:
Overrides:
Source:

Methods

getDescription() → {string}

Returns the human-readable description for the authentication method / provider.

Overrides:
Source:
Returns:
Type
string

getId() → {string}

Get an identifier for the auth provider (combination of the type + provider identifier).

Overrides:
Source:
Returns:
Type
string

getProviderId() → {string}

Returns the provider identifier, may not be available for all authentication methods.

Overrides:
Source:
Returns:
Type
string

getTitle() → {string}

Returns the human-readable title for the authentication method / provider.

Overrides:
Source:
Returns:
Type
string

getToken() → {string|null}

Returns the access token that is used as Bearer Token in API requests.

Returns null if no access token has been set yet (i.e. not authenticated any longer).

Overrides:
Source:
Returns:
Type
string | null

getType() → {string}

Returns the type of the authentication procedure as specified by the API, e.g. oidc or basic.

Overrides:
Source:
Returns:
Type
string

(async) login(username, password) → {Promise.<void>}

Authenticate with HTTP Basic.

Parameters:
Name Type Description
username string
password string
Overrides:
Source:
Throws:
Error
Returns:
Type
Promise.<void>

(async) logout()

Logout from the established session.

This is experimental and just removes the token for now. May need to be overridden by sub-classes.

Overrides:
Source:

setToken(tokennullable)

Sets the access token that is used as Bearer Token in API requests.

Set to null to remove the access token.

This also manages which auth provider is set for the connection.

Parameters:
Name Type Attributes Description
token string <nullable>
Overrides:
Source: