def get_xrds_url(resource, request):
 host = request.get_host()
 location = (((host + '/openid/provider/') + resource) + '/')
 if request.is_secure():
  return ('https://' + location)
 else:
  return ('http://' + location)

def get_xrds_url ( resource , request ) : host = request . get_host ( ) location = ( ( ( host + '/openid/provider/' ) + resource ) + '/' ) if request . is_secure ( ) : return ( 'https://' + location ) else : return ( 'http://' + location )
return the xrds url for a resource .