Skip to main content

A Python wrapper for handling Steam OpenID authentication.

Project description

steam-openid

steam-openid is a Python wrapper for handling Steam OpenID authentication using the python3-openid library.

Requirements

  • Python 3.6 or higher
  • python3-openid

You can install the required dependencies with:

pip install -r requirements.txt

Example usage

steam_openid = SteamOpenID(
    realm="http://localhost:8080/steam/login",
    return_to="http://localhost:8080/steam/callback"
)


@app.route("/steam/login")
def login():
    redirect_url = steam_openid.get_redirect_url()
    return redirect(redirect_url)


@app.route("/steam/callback")
def callback(request):
    steam_id = steam_openid.validate_results(request.query_params)
    if steam_id:
        return 200, f"Your steam id is: {steam_id}"
    else:
        return 403, "Failed to authenticate"

Contributions

Pull requests are welcome! If you find a bug or have a feature request, please open an issue or submit a pull request.

License

This project is licensed under the MIT License.

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

steam_openid-1.0.1.tar.gz (1.7 kB view details)

Uploaded Source

Built Distribution

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

steam_openid-1.0.1-py3-none-any.whl (1.6 kB view details)

Uploaded Python 3

File details

Details for the file steam_openid-1.0.1.tar.gz.

File metadata

  • Download URL: steam_openid-1.0.1.tar.gz
  • Upload date:
  • Size: 1.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for steam_openid-1.0.1.tar.gz
Algorithm Hash digest
SHA256 3f224f6cfaaac5efe6971e0872930cb9a0cd2ea30c2fdf68f0954c9ac57110d6
MD5 d63a6a6a7864857ab38888523a8f45b7
BLAKE2b-256 4b500e9931a8ca1ea828f512059f6761c459ab05046a43a71fc4d39335c9c231

See more details on using hashes here.

File details

Details for the file steam_openid-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: steam_openid-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 1.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for steam_openid-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 51c94da78c0937af2901cd65f892036a9376f0dd43d77bd40fb2b14c3661aae6
MD5 dcd7db64a60ddd6f2b7e39bb69fd6ac3
BLAKE2b-256 992df6ec9fdbf06de9b2ceacc39e332e88ef68c1714d736dc21c1828f9b32f07

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