Skip to main content

Turn Okta User IDs into UUIDs.

Project description

This is a simple module for turning Okta’s user IDs (which appear to be base62-encoded integers) into UUIDs, and vice versa. This is useful for integrating Okta with systems or services where you don’t necessarily want to use string identifiers.

Installing

First, make sure you’re using Python 3.2 or newer.

Install from pypi: pip install okta-uuid

Developing

  • Create a virtualenv.

  • Clone this repo.

  • Install the requirements: python setup.py develop.

  • Hack away!

There’s a (small!) test suite included. You can run it with python test.py.

Using

Get a UUID from an Okta ID:

idstr = '00ABCD1234wxyz5678pq'
oid = okta_uuid.OktaUserId(idstr)

print(repr(oid))
print(oid)
print(oid.uuid)

# output:
#
# OktaUserId('00ABCD1234wxyz5678pq')
# 00ABCD1234wxyz5678pq
# cb406d76-d66a-6007-5001-36cc7b010000

Get an Okta ID from a UUID:

idstr = '00ABCD1234wxyz5678pq'
oid = okta_uuid.OktaUserId(idstr)
new_oid = okta_uuid.OktaUserId.from_uuid(oid.uuid)

print(new_oid)
print(oid == new_oid)

# output:
#
# 00ABCD1234wxyz5678pq
# True

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

okta-uuid-0.1.0.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

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

okta_uuid-0.1.0-py3-none-any.whl (2.4 kB view details)

Uploaded Python 3

File details

Details for the file okta-uuid-0.1.0.tar.gz.

File metadata

  • Download URL: okta-uuid-0.1.0.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for okta-uuid-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bfff140761e3c418d0b1c7a8da5222ad5d378c988641f0777145b52915d02793
MD5 ee9ceb3c2a27994a9117d808eef7b3f9
BLAKE2b-256 f12a6c09a9b0d23325decca1c0cdc54bbcb61b72177449e9df2614c2dc813308

See more details on using hashes here.

File details

Details for the file okta_uuid-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for okta_uuid-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a835f695ae8482d438e47480975896603e4f20d646523d63b6c497362934c77f
MD5 a93704086f901a3b2c0cb71376c90e0d
BLAKE2b-256 a6cc4ec992ac0801cc5db7f2c14db23b49ea19bbcb8490c71f249e67be67f6fb

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