Class: AuthProvider

(abstract) AuthProvider(type, connection, options)

The base class for authentication providers such as Basic and OpenID Connect.

Constructor

(abstract) new AuthProvider(type, connection, options)

Creates a new OidcProvider instance to authenticate using OpenID Connect.

Parameters:
Name Type Description
type string

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

connection Connection

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

options AuthProviderMeta

Options

Source:

Members

(protected) connection :Connection

Type:
Source:

Methods

getDescription() → {string}

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

Source:
Returns:
Type
string

getId() → {string}

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

Source:
Returns:
Type
string

getProviderId() → {string}

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

Source:
Returns:
Type
string

getTitle() → {string}

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

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).

Source:
Returns:
Type
string | null

getType() → {string}

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

Source:
Returns:
Type
string

(async) login(…args)

Abstract method that extending classes implement the login process with.

Parameters:
Name Type Attributes Description
args * <repeatable>
Source:
Throws:
Error

(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.

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>
Source: