Skip to main content

repoze.who.plugins.vepauth

Project description

This is a repoze.who plugin for automated authentication via BrowserID:

https://browserid.org/ https://wiki.mozilla.org/Identity/BrowserIDSync

The plugin implements an experimental protocol for authenticating to ReSTful web services with the Verified Email Protocol, a.k.a Mozilla’s BrowserID project. It is designed for use in automated tools like the Firefox Sync Client. If you’re looking for something to use for human visitors on your site, please try:

http://github.com/mozilla-services/repoze.who.plugins.browserid

When accessing a protected resource, the server will generate a 401 challenge response with the scheme “OAuth+VEP” as follows:

> GET /protected_resource HTTP/1.1
> Host: example.com

< HTTP/1.1 401 Unauthorized
< WWW-Authenticate: OAuth+VEP url="/request_token"

The client should extract the url from this challenge and POST a VEP assertion to that location. This will create a new authentication session and return a set of OAuth client credentials:

> POST /request_token HTTP/1.1
> Host: example.com
> Content-Type: application/x-www-form-urlencoded
>
> assertion=VEP_ASSERTION_DATA

< HTTP/1.1 200 OK
< Content-Type: application/json
<
< {
<   "oauth_consumer_key": SESSION_TOKEN,
<   "oauth_consumer_secret": SESSION_SECRET
< }

Subsequent requests should be signed using these credentials in Two-Legged OAuth mode:

> GET /protected_resource HTTP/1.1
> Host: example.com
> Authorization: OAuth oauth_consumer_key=SESSION_TOKEN,
>                      oauth_signature_method="HMAC-SHA1",
>                      oauth_version="1.0",
>                      oauth_timestamp=TIMESTAMP,
>                      oauth_nonce=NONCE
>                      oauth_signature=SIGNATURE

< HTTP/1.1 200 OK
< Content-Type: text/plain
<
< For your eyes only:  secret data!

Session tokens are timestamped and will eventually expire. If this happens you will receive a 401 response as before, and should POST a new assertion to obtain fresh credentials.

0.1.0 - 2012-02-07

  • Initial release.

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

repoze.who.plugins.vepauth-0.1.0.tar.gz (17.7 kB view details)

Uploaded Source

File details

Details for the file repoze.who.plugins.vepauth-0.1.0.tar.gz.

File metadata

File hashes

Hashes for repoze.who.plugins.vepauth-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a6d26478a060d04f690b0df2695cc9acf92046ebb3e5aed86bdd7201fd613933
MD5 cd6473e24a21f16027c1ee2b6fe90feb
BLAKE2b-256 1c6f060b58fa0a3dd84a0f0a6e03d3d38d9e7f7e6b75ba920b362547666e573e

See more details on using hashes here.

Supported by

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