def processTrustResult(request):
 openid_request = getRequest(request)
 response_identity = getViewURL(request, idPage)
 allowed = ('allow' in request.POST)
 openid_response = openid_request.answer(allowed, identity=response_identity)
 if allowed:
  sreg_data = {'fullname': 'Example User', 'nickname': 'example', 'dob': '1970-01-01', 'email': 'invalid@example.com', 'gender': 'F', 'postcode': '12345', 'country': 'ES', 'language': 'eu', 'timezone': 'America/New_York'}
  sreg_req = sreg.SRegRequest.fromOpenIDRequest(openid_request)
  sreg_resp = sreg.SRegResponse.extractResponse(sreg_req, sreg_data)
  openid_response.addExtension(sreg_resp)
  pape_response = pape.Response()
  pape_response.setAuthLevel(pape.LEVELS_NIST, 0)
  openid_response.addExtension(pape_response)
 return displayResponse(request, openid_response)

def processTrustResult ( request ) : openid_request = getRequest ( request ) response_identity = getViewURL ( request , idPage ) allowed = ( 'allow' in request . POST ) openid_response = openid_request . answer ( allowed , identity = response_identity ) if allowed : sreg_data = { 'fullname' : 'Example User' , 'nickname' : 'example' , 'dob' : '1970-01-01' , 'email' : 'invalid@example.com' , 'gender' : 'F' , 'postcode' : '12345' , 'country' : 'ES' , 'language' : 'eu' , 'timezone' : 'America/New_York' } sreg_req = sreg . SRegRequest . fromOpenIDRequest ( openid_request ) sreg_resp = sreg . SRegResponse . extractResponse ( sreg_req , sreg_data ) openid_response . addExtension ( sreg_resp ) pape_response = pape . Response ( ) pape_response . setAuthLevel ( pape . LEVELS_NIST , 0 ) openid_response . addExtension ( pape_response ) return displayResponse ( request , openid_response )
handle the result of a trust decision and respond to the rp accordingly .