Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p

## [Unreleased]

### Added

- Added `cmem_base_uri`, `dp_api_endpoint`, and `di_api_endpoint` to `SystemContext`.
- Added `refresh_token` to `UserContext`.

### Changed

- Updated template
Expand Down
26 changes: 25 additions & 1 deletion cmem_plugin_base/dataintegration/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,24 @@ class SystemContext:
def di_version(self) -> str:
"""Get the version of the running DataIntegration instance"""

def cmem_base_uri(self) -> str | None:
"""Get the base URI of eccenca DataManager.

Returns the base URI without trailing slash if configured, otherwise None.
"""

def dp_api_endpoint(self) -> str | None:
"""Get the base URI of eccenca DataPlatform.

Returns the base URI without trailing slash if configured, otherwise None.
"""

def di_api_endpoint(self) -> str:
"""Get the base URI of eccenca DataIntegration.

Returns the base URI without trailing slash.
"""

def encrypt(self, value: str) -> str:
"""Encrypt a value using the secret key

Expand All @@ -39,7 +57,13 @@ def user_label(self) -> str:
"""Get the name of the user"""

def token(self) -> str:
"""Retrieve the oAuth token for the user"""
"""Retrieve the oAuth token for the user.

Will already be refreshed if expired.
"""

def refresh_token(self) -> str:
"""Retrieve the oAuth refresh token for the user"""


class TaskContext:
Expand Down