Skip to content

oof-software/openid-2.0

Repository files navigation

openid-2.0

Based on node-openid and tries to be at least a tiny (🤏) bit spec compliant.

Constraints

  • Always using the checkid_setup mode (not using immediate mode)
  • No extensions are implemented
  • I think the strict mode of node-openid corresponds to enforcing encryption which we do
    • The constructed reqwest::Client uses at least TLSv1.2 and is set to HTTPS only.

Steam Authetication

  1. The user visits /api/auth/steam/login
  2. A random nonce N is generated and saved
  3. The user is redirected to Steam to log in
    1. Where steam redirects the user after a successful login is encoded in the URL
    2. Steam includes the nonce N when redirecting the user back to us
  4. The user signs in to his Steam account and accepts the authentication request
  5. The user is redirected to /api/auth/steam/callback
  6. We check the validity of the info encoded in the URL parameters
  7. We check that the nonce matches the nonce N and is not replayed
  8. We send a request to Steam to validate the info encoded in the URL parameters
  9. Steam approves the info (signature is correct)
  10. The user successfully authenticated through Steam

Notes

Utilities

  • Generate N bytes of random data as a base64 string
    • echo $(openssl rand -base64 64 | tr -d '\n ')

Relevant Documentation

To Do

Cool Stuff

Credits 💖

  • actix-web: Web framework.
  • anyhow: Simplifies error handling.
  • base64: Encode and decode data in Base64 format.
  • chrono: Date and time library.
  • chrono-humanize: Formats time in a human-readable way.
  • log: Logging facade.
  • rand: Random number generation.
  • reqwest: HTTP client for making web requests.
  • roxmltree: Fast and efficient XML library.
  • serde: Serialization framework.
  • serde_json: JSON serialization and deserialization using Serde.
  • serde_urlencoded: URL encoding and decoding using Serde.
  • simplelog: Simple logging library.
  • tokio: Asynchronous runtime.

And all other in the Cargo.toml! Descriptions above are generated using ChatGPT

forsenSmug

forsen forsen forsen forsen forsen forsen forsen
forsen forsen forsen forsen forsen forsen forsen
forsen forsen forsen forsen forsen forsen forsen
forsen forsen forsen forsen forsen forsen forsen
forsen forsen forsen forsen forsen forsen forsen
forsen forsen forsen forsen forsen forsen forsen
forsen forsen forsen forsen forsen forsen forsen
forsen forsen forsen forsen forsen forsen forsen
forsen forsen forsen forsen forsen forsen forsen

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published