def GET(self): # pylint:disable=no-self-use,invalid-name """ GET """ token = get_token() if token: header('X-Rucio-Auth-Token', token) return str() else: raise generate_http_error(401, 'CannotAuthenticate', 'Cannot get token')
def GET(self): # pylint:disable=no-self-use,invalid-name """ GET """ # get info about x509 or not and decide auth_type = cookies().get('x-rucio-auth-type') if str(auth_type).lower() == 'x509': token = get_token(get_auth_token_x509) if token: header('X-Rucio-Auth-Token', token) return str() else: raise generate_http_error(401, 'CannotAuthenticate', 'Cannot get token') else: render = template.render(join(dirname(__file__), 'templates/')) return render.select_login_method(AUTH_ISSUERS, SAML_SUPPORT, None)