Update to recent CAS protocol version.

This commit is contained in:
Michael Hierweck 2021-09-22 12:31:48 +02:00
parent f2bf33e8b3
commit cd5bba77c1
3 changed files with 12 additions and 3 deletions

View File

@ -4,7 +4,7 @@ Changelog
0.1
---
- Initial release.
- Initial release.
[Michael Hierweck <michael.hierweck@hostsharing.net>, Hostsharing eG]
@ -16,3 +16,10 @@ Changelog
- Add build instructions.
[Michael Hierweck <michael.hierweck@hostsharing.net>, Hostsharing eG]
0.3
---
- Update to recent CAS protocol version.
[Michael Hierweck <michael.hierweck@hostsharing.net>, Hostsharing eG]

View File

@ -1,7 +1,7 @@
from setuptools import setup, find_packages
import os
version = '0.2'
version = '0.3'
long_description = (
open('README.txt').read())
@ -28,6 +28,7 @@ setup(name='hs.admin.api',
install_requires=[
'setuptools',
'requests',
'pyyaml',
# -*- Extra requirements: -*-
],
entry_points="""

View File

@ -2,6 +2,7 @@
"""
from requests import delete, post
from yaml import safe_load
from .exceptions import LoginError, SessionError
@ -33,7 +34,7 @@ class Session(object):
result = post(self.tgt, data=payload)
if result.status_code != 200:
raise SessionError('Acquisition of session ticket failed.')
return result.text
return safe_load(result.text)
def get_user(self):