def _authn_context_class_ref(authn_class, authn_auth=None):
 cntx_class = factory(saml.AuthnContextClassRef, text=authn_class)
 if authn_auth:
  return factory(saml.AuthnContext, authn_context_class_ref=cntx_class, authenticating_authority=factory(saml.AuthenticatingAuthority, text=authn_auth))
 else:
  return factory(saml.AuthnContext, authn_context_class_ref=cntx_class)

def _authn_context_class_ref ( authn_class , authn_auth = None ) : cntx_class = factory ( saml . AuthnContextClassRef , text = authn_class ) if authn_auth : return factory ( saml . AuthnContext , authn_context_class_ref = cntx_class , authenticating_authority = factory ( saml . AuthenticatingAuthority , text = authn_auth ) ) else : return factory ( saml . AuthnContext , authn_context_class_ref = cntx_class )
construct the authn context with a authn context class reference .