Skip to content
This repository has been archived by the owner on May 9, 2022. It is now read-only.

Commit

Permalink
Consentire avvio in modalità headless (con login automatico)
Browse files Browse the repository at this point in the history
  • Loading branch information
lussoluca committed Sep 21, 2018
1 parent 99016fb commit b54f444
Show file tree
Hide file tree
Showing 3 changed files with 215 additions and 140 deletions.
9 changes: 8 additions & 1 deletion testenv/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

HTTPRedirectRequest = namedtuple(
'HTTPRedirectRequest',
['saml_request', 'relay_state', 'sig_alg', 'signature', 'signed_data'],
['saml_request', 'relay_state', 'sig_alg', 'signature', 'signed_data', 'auto_login'],
)


Expand Down Expand Up @@ -59,13 +59,15 @@ def __init__(self, querystring, request_class=None):
self._sig_alg = None
self._signature = None
self._signed_data = None
self._auto_login = None

def parse(self):
self._saml_request = self._parse_saml_request()
self._relay_state = self._parse_relay_state()
self._sig_alg = self._parse_sig_alg()
self._signature = self._parse_signature()
self._signed_data = self._build_signed_data()
self._auto_login = self._build_auto_login()
return self._build_request()

def _parse_saml_request(self):
Expand Down Expand Up @@ -121,13 +123,18 @@ def _build_signed_data(self):
)
return signed_data.encode('ascii')

def _build_auto_login(self):
auto_login = self._querystring.get('auto_login', None)
return auto_login

def _build_request(self):
return self._request_class(
self._saml_request,
self._relay_state,
self._sig_alg,
self._signature,
self._signed_data,
self._auto_login
)


Expand Down
Loading

0 comments on commit b54f444

Please sign in to comment.