Commit 975e0602 authored by Meet Mangukiya's avatar Meet Mangukiya

Interfaces: Add Token base class

parent fe8c3406
......@@ -9,6 +9,27 @@ from requests import Session
HEADERS = {'User-Agent': 'IGitt'}
class Token:
"""
Base class for different types of tokens used for different methods of
authentications.
"""
@property
def value(self):
"""
Token value
"""
raise NotImplementedError
@property
def parameter(self):
"""
Parameter to be used for authentication
"""
raise NotImplementedError
def error_checked_request(func):
"""
Create an error check wrapper augmenting ``func`` to perform the given
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment