def get(self): handler = self.sp.get_default_idp_handler() login_next = self.sp.get_login_return_url() if handler: return redirect( url_for('.login_idp', entity_id=handler.entity_id, next=login_next)) return self.sp.render_template('flask_saml2_sp/choose_idp.html', login_next=login_next, handlers=self.sp.get_idp_handlers())
def handle_login_request(self, saml_request, relay_state): session['SAMLRequest'] = saml_request session['RelayState'] = relay_state return redirect(url_for('.login_process', _external=True))
def get_slo_url(self): """Get the URL for the Single Log Out endpoint for this IdP.""" return url_for(self.blueprint_name + '.logout', _external=True)
def get_metadata_url(self): """Get the URL for the metadata XML document for this IdP.""" return url_for(self.blueprint_name + '.metadata', _external=True)
def get_sso_url(self): """Get the URL for the Single Sign On endpoint for this IdP.""" return url_for(self.blueprint_name + '.login_begin', _external=True)
def get_metadata_url(self) -> str: """The URL for the metadata xml for this SP. """ return url_for(self.blueprint_name + '.metadata', _external=True)
def get_sls_url(self) -> str: """The URL for the Single Logout Service for this SP. """ return url_for(self.blueprint_name + '.sls', _external=True)
def get_acs_url(self) -> str: """The URL for the Assertion Consumer Service for this SP. """ return url_for(self.blueprint_name + '.acs', _external=True)
def get_login_url(self) -> str: """The URL of the endpoint that starts the login process. """ return url_for(self.blueprint_name + '.login')