Skip to main content

OIDC helpers for Vercel Python applications

Project description

OIDC

vercel.oidc retrieves and decodes Vercel OIDC tokens.

Async Token Lookup

from vercel.oidc import decode_oidc_payload
from vercel.headers import set_headers
from vercel.oidc.aio import get_vercel_oidc_token


async def main() -> None:
    token = await get_vercel_oidc_token()
    payload = decode_oidc_payload(token)
    project_id = payload.get("project_id")

Token lookup prefers the x-vercel-oidc-token request header registered with vercel.headers.set_headers(), then VERCEL_OIDC_TOKEN. The compatibility alias vercel.oidc.set_headers() updates the same header context. In local development, you can load a short-lived token dynamically:

VERCEL_OIDC_TOKEN=$(vc project token some-project) some-command

Use vercel.oidc.get_vercel_oidc_token() for synchronous code.

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

vercel_oidc-0.6.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

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

vercel_oidc-0.6.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file vercel_oidc-0.6.0.tar.gz.

File metadata

  • Download URL: vercel_oidc-0.6.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.25 {"installer":{"name":"uv","version":"0.11.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for vercel_oidc-0.6.0.tar.gz
Algorithm Hash digest
SHA256 53d3af9fcf40dee0803db213c41f374d0df10fc81f33018230ce6525ba41ab5e
MD5 76be7c87e4a009ff5528805742903678
BLAKE2b-256 eb6d51d875207ebbb0709ef01a1ceff6706bd3dd966c1edff732225824ed1f45

See more details on using hashes here.

File details

Details for the file vercel_oidc-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: vercel_oidc-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.25 {"installer":{"name":"uv","version":"0.11.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for vercel_oidc-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7db018b5a970f2d30a5c2b7fc62a21c5c79c06921bd9295c34b0960c9550d992
MD5 b0bc50b0a66417e27e61078564e653e6
BLAKE2b-256 bb6c89129d15ae215cae7938b7cc5e54d7687c3ba624771e0aa85dfbaeb7b083

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