Update to recent CAS protocol version.
This commit is contained in:
parent
f2bf33e8b3
commit
cd5bba77c1
@ -16,3 +16,10 @@ Changelog
|
|||||||
|
|
||||||
- Add build instructions.
|
- Add build instructions.
|
||||||
[Michael Hierweck <michael.hierweck@hostsharing.net>, Hostsharing eG]
|
[Michael Hierweck <michael.hierweck@hostsharing.net>, Hostsharing eG]
|
||||||
|
|
||||||
|
|
||||||
|
0.3
|
||||||
|
---
|
||||||
|
|
||||||
|
- Update to recent CAS protocol version.
|
||||||
|
[Michael Hierweck <michael.hierweck@hostsharing.net>, Hostsharing eG]
|
||||||
|
3
setup.py
3
setup.py
@ -1,7 +1,7 @@
|
|||||||
from setuptools import setup, find_packages
|
from setuptools import setup, find_packages
|
||||||
import os
|
import os
|
||||||
|
|
||||||
version = '0.2'
|
version = '0.3'
|
||||||
|
|
||||||
long_description = (
|
long_description = (
|
||||||
open('README.txt').read())
|
open('README.txt').read())
|
||||||
@ -28,6 +28,7 @@ setup(name='hs.admin.api',
|
|||||||
install_requires=[
|
install_requires=[
|
||||||
'setuptools',
|
'setuptools',
|
||||||
'requests',
|
'requests',
|
||||||
|
'pyyaml',
|
||||||
# -*- Extra requirements: -*-
|
# -*- Extra requirements: -*-
|
||||||
],
|
],
|
||||||
entry_points="""
|
entry_points="""
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
from requests import delete, post
|
from requests import delete, post
|
||||||
|
from yaml import safe_load
|
||||||
|
|
||||||
from .exceptions import LoginError, SessionError
|
from .exceptions import LoginError, SessionError
|
||||||
|
|
||||||
@ -33,7 +34,7 @@ class Session(object):
|
|||||||
result = post(self.tgt, data=payload)
|
result = post(self.tgt, data=payload)
|
||||||
if result.status_code != 200:
|
if result.status_code != 200:
|
||||||
raise SessionError('Acquisition of session ticket failed.')
|
raise SessionError('Acquisition of session ticket failed.')
|
||||||
return result.text
|
return safe_load(result.text)
|
||||||
|
|
||||||
|
|
||||||
def get_user(self):
|
def get_user(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user