Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

documentation string

  • Loading branch information...
commit 1a7bc2e88b6a8a6164dcfcc12f66370656dd1ade 1 parent ae85d65
Adam Lindsay authored February 29, 2012

Showing 1 changed file with 15 additions and 1 deletion. Show diff stats Hide diff stats

  1. 16  http_signature/request_auth.py
16  http_signature/request_auth.py
... ...
@@ -1,8 +1,22 @@
  1
+from wsgiref.handlers import format_date_time
  2
+from datetime import datetime
  3
+from time import mktime
  4
+
1 5
 from requests.auth import AuthBase
2 6
 
3  
-from sign import Signer
  7
+from .sign import Signer
  8
+
4 9
 
5 10
 class HTTPSignatureAuth(AuthBase):
  11
+    '''
  12
+    Sign a request using the http-signature scheme.
  13
+    https://github.com/joyent/node-http-signature/blob/master/http_signing.md
  14
+    
  15
+    key_id is the mandatory label indicating to the server which secret to use
  16
+    secret is the filename of a pem file in the case of rsa, a password string in the case of an hmac algorithm
  17
+    algorithm is one of the six specified algorithms
  18
+    headers is a list of http headers to be included in the signing string, defaulting to "Date" alone.
  19
+    '''
6 20
     def __init__(self, key_id='', secret='', algorithm='rsa-sha256', headers=None):
7 21
         self.signer = Signer(secret=secret, algorithm=algorithm)
8 22
         self.algorithm = algorithm

0 notes on commit 1a7bc2e

Please sign in to comment.
Something went wrong with that request. Please try again.