Package restkit :: Package oauth2 :: Module filter :: Class OAuthFilter
[hide private]
[frames] | no frames]

Class OAuthFilter

source code

object --+
         |
        OAuthFilter

Instance Methods [hide private]
 
__init__(self, rules)
Initalize Oauth filter wiht a tupple or list of tupples::
source code
 
parse_rules(self) source code
 
add_rule(self, rule) source code
 
on_path(self, req) source code
 
on_request(self, req) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, rules)
(Constructor)

source code 

Initalize Oauth filter wiht a tupple or list of tupples::

    (path, consumer, token, signaturemethod) 

token and method signature are optionnals. Consumer should be an 
instance of `oauth2.Consumer`, token an  instance of `oauth2.Toke` 
signature method an instance of `oauth2.SignatureMethod`.

With a list of tupple, the filter will try to match the path with 
the rule. It allows you to maintain different authorization per
path. A wildcard at the indicate to the filter to match all path
behind.

Example the rule::

    /some/resource/*
    
will match :

    /some/resource/other
    /some/resource/other2
    
while the rule `/some/resource` will only match the path 
`/some/resource`.
    
    

Overrides: object.__init__