Skip to main content

Trimble Authentication module Client Library for Python

Project description

Trimble Identity SDK Libraries for Python

Installation

The Trimble Identity library is available as a PyPi package. To use this package, run the following pip command.

pip install trimble-id --index- url=https://<trimble-email>:<password>@artifactory.trimble.tools/artifactory/api/pypi/trimblecloudflatform-engagement-pypi/simple --extra-index-url=https://pypi.python.org/simple

Well-Known URL endpoint

The well-known URL endpoint is used to retrieve the authorization, token and user info endpoints for a given environment. The following endpoints are available for the staging and production environments:

Staging https://stage.id.trimblecloud.com/.well-known/openid-configuration
Production https://id.trimble.com/.well-known/openid-configuration

OpenID Endpoint Provider

This endpoint provider is used to retrieve the endpoints from a well-known URL endpoint.

Usage

from trimble.id.open_id_endpoint_provider import OpenIdEndpointProvider

endpoint_provider = OpenIdEndpointProvider("open_id_configuration_url")
endpoint = await endpoint_provider.retrieve_authorization_endpoint()

Fixed Endpoint Provider

This endpoint provider is used to provide a fixed set of endpoints.

Usage

from trimble.id.fixed_endpoint_provider import FixedEndpointProvider

endpoint_provider = FixedEndpointProvider("https://authorization.url", "https://token.url", "https://userinfo.url")
endpoint = await endpoint_provider.retrieve_authorization_endpoint()

Client Credential Token Provider

This token provider is used to retrieve an access token using the client credentials grant type.

Usage

from trimble.id.client_credential_token_provider import ClientCredentialTokenProvider

token_provider = ClientCredentialTokenProvider(endpoint_provider, "consumer_key", "consumer_secret").with_scopes(["scope"])

access_token = await token_provider.retrieve_token()

Bearer Token HTTP Client Provider

It is possible to use the trimble-id library to retrieve an HttpClient with the appropriate authorization header set. This can be used to make requests to the Trimble Cloud Core Platform APIs.

Usage

from trimble.id.bearer_token_http_client_provider import BearerTokenHttpClientProvider

http_client_provider = BearerTokenHttpClientProvider(token_provider, "base_url")
http_client = await http_client_provider.retrieve_client()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

trimble-id-0.0.1rc1.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

trimble_id-0.0.1rc1-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file trimble-id-0.0.1rc1.tar.gz.

File metadata

  • Download URL: trimble-id-0.0.1rc1.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for trimble-id-0.0.1rc1.tar.gz
Algorithm Hash digest
SHA256 cba8b82f448b759b03f5ac15edcbca6c699e144ba0182c1ae4eedfe51d49170e
MD5 fffb2b051cadf74c4ff737d14e67980b
BLAKE2b-256 f87ea39e7dc213f46aa0f241040f4f57261943b49f9c879231153204355b51e4

See more details on using hashes here.

File details

Details for the file trimble_id-0.0.1rc1-py3-none-any.whl.

File metadata

  • Download URL: trimble_id-0.0.1rc1-py3-none-any.whl
  • Upload date:
  • Size: 15.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for trimble_id-0.0.1rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 17775034c1235b5ff8602f829788386d1c3cd2be1497beaaf3d5ba7b1e55c7a3
MD5 3246eebf604f1f37661a31a848b49bea
BLAKE2b-256 dc4736e4b147dab7579f2df897b0b12c74036b6d5aa34af9e73744236625bd24

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page