here.platform.auth module#
This module provides an Auth class to authenticate an app on the platform.
The authentication is based on some credentials object and will create an access token. It can be checked if the token is still valid, and it can be refreshed, too.
- class here.platform.auth.Auth(credentials: PlatformCredentials, aaa_oauth2_api: AAAOauth2Api | None = None)[source]#
Bases:
objectThis class is responsible for authenticating with the HERE platform.
It requires PlatformCredentials, AAAOauth2BaseApi object.
- set_scope(project_hrn: str)[source]#
Explicitly sets the project scope if not set yet or overwrites the project scope from the configuration.
- Parameters:
project_hrn – the project HRN string
- property token: str | None#
Return the current token or requests a new one if needed.
- Returns:
a valid token