public IdTokenBody SVX_MakeIdTokenBody(IdTokenRequest req, IdPAuthenticationEntry idpConc)
 {
     return(new IdTokenBody
     {
         rpPrincipal = req.rpPrincipal,
         username = idpConc.googleUsername
     });
 }
            public string LoginStart(Principal client)
            {
                var req = new IdTokenRequest
                {
                    rpPrincipal = SVX_Principal,
                    state       = stateGenerator.Generate(
                        new StateParams {
                        client = client, idpPrincipal = googlePrincipal
                    },
                        SVX_Principal)
                };

                idTokenRequestStructure.Export(req, client, googlePrincipal);
                return(JsonConvert.SerializeObject(req));
            }
            public IdTokenResponse SVX_MakeIdTokenResponse(IdTokenRequest req, IdPAuthenticationEntry idpConc)
            {
                // In TokenEndpoint, we requested an IdPAuthenticationEntry for
                // req.SVX_sender, but SVX doesn't know that, so we have to do a
                // concrete check.
                VProgram_API.Assert(req.SVX_sender == idpConc.authenticatedClient);

                // Put this in a separate SVX method so "body" gets an active SymT.
                var body = SVX_Ops.Call(SVX_MakeIdTokenBody, req, idpConc);

                return(new IdTokenResponse
                {
                    idToken = idTokenGenerator.Generate(body, SVX_Principal),  // sign the token
                    state = req.state
                });
            }