@login_required
def echo_attributes(request, config_loader_path=None, template='djangosaml2/echo_attributes.html'):
 state = StateCache(request.session)
 conf = get_config(config_loader_path, request)
 client = Saml2Client(conf, state_cache=state, identity_cache=IdentityCache(request.session))
 subject_id = _get_subject_id(request.session)
 identity = client.users.get_identity(subject_id, check_not_on_or_after=False)
 return render_to_response(template, {'attributes': identity[0]}, context_instance=RequestContext(request))

@ login_required def echo_attributes ( request , config_loader_path = None , template = 'djangosaml2/echo_attributes.html' ) : state = StateCache ( request . session ) conf = get_config ( config_loader_path , request ) client = Saml2Client ( conf , state_cache = state , identity_cache = IdentityCache ( request . session ) ) subject_id = _get_subject_id ( request . session ) identity = client . users . get_identity ( subject_id , check_not_on_or_after = False ) return render_to_response ( template , { 'attributes' : identity [ 0 ] } , context_instance = RequestContext ( request ) )
example view that echo the saml attributes of an user .