示例#1
0
        public async Task <ViewResult> Index(string tenant, [FromHeader(Name = "tazzy-saml")] string samlKey)
        {
            //Tazzy-SSO-protected web page -> use tazzy-saml header
            var user = tasClient.GetWellKnownSamlAttributes(tenant, samlKey);

            var simple   = tasClient.Builder(tenant).WithDev("buddy").RequestAsync <string>("/helloWorld");
            var onBehalf = tasClient.Builder(tenant).WithDev("buddy").WithAuth(Request).RequestAsync <string>("/helloWorld/me");
            var nonSot   = tasClient.Builder(tenant).WithDev("buddy").RollupAsync <string>("/helloWorld/forApp");

            ViewData["tenant"]   = tenant;
            ViewData["user"]     = (await user).TasPersonalEmail;
            ViewData["simple"]   = await simple;
            ViewData["onBehalf"] = await onBehalf;
            ViewData["nonSot"]   = await nonSot;
            return(View());
        }