Beispiel #1
0
        /// <summary>
        /// Get recaptcha secure param.
        /// Documentation https://developers.google.com/identitytoolkit/v3/reference/relyingparty/getRecaptchaParam
        /// Generation Note: This does not always build corectly.  Google needs to standardise things I need to figuer out which ones are wrong.
        /// </summary>
        /// <param name="service">Authenticated IdentityToolkit service.</param>
        /// <returns>GetRecaptchaParamResponseResponse</returns>
        public static GetRecaptchaParamResponse GetRecaptchaParam(IdentityToolkitService service)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }

                // Make the request.
                return(service.Relyingparty.GetRecaptchaParam().Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request Relyingparty.GetRecaptchaParam failed.", ex);
            }
        }
Beispiel #2
0
        /// <summary>
        /// Delete user account.
        /// Documentation https://developers.google.com/identitytoolkit/v3/reference/relyingparty/deleteAccount
        /// Generation Note: This does not always build corectly.  Google needs to standardise things I need to figuer out which ones are wrong.
        /// </summary>
        /// <param name="service">Authenticated IdentityToolkit service.</param>
        /// <param name="body">A valid IdentityToolkit v3 body.</param>
        /// <returns>DeleteAccountResponseResponse</returns>
        public static DeleteAccountResponse DeleteAccount(IdentityToolkitService service, IdentitytoolkitRelyingpartyDeleteAccountRequest body)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }
                if (body == null)
                {
                    throw new ArgumentNullException("body");
                }

                // Make the request.
                return(service.Relyingparty.DeleteAccount(body).Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request Relyingparty.DeleteAccount failed.", ex);
            }
        }
Beispiel #3
0
        /// <summary>
        /// Verifies the developer asserted ID token.
        /// Documentation https://developers.google.com/identitytoolkit/v3/reference/relyingparty/verifyCustomToken
        /// Generation Note: This does not always build corectly.  Google needs to standardise things I need to figuer out which ones are wrong.
        /// </summary>
        /// <param name="service">Authenticated IdentityToolkit service.</param>
        /// <param name="body">A valid IdentityToolkit v3 body.</param>
        /// <returns>VerifyCustomTokenResponseResponse</returns>
        public static VerifyCustomTokenResponse VerifyCustomToken(IdentityToolkitService service, IdentitytoolkitRelyingpartyVerifyCustomTokenRequest body)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }
                if (body == null)
                {
                    throw new ArgumentNullException("body");
                }

                // Make the request.
                return(service.Relyingparty.VerifyCustomToken(body).Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request Relyingparty.VerifyCustomToken failed.", ex);
            }
        }
Beispiel #4
0
        /// <summary>
        /// Get a code for user action confirmation.
        /// Documentation https://developers.google.com/identitytoolkit/v3/reference/relyingparty/getOobConfirmationCode
        /// Generation Note: This does not always build corectly.  Google needs to standardise things I need to figuer out which ones are wrong.
        /// </summary>
        /// <param name="service">Authenticated IdentityToolkit service.</param>
        /// <param name="body">A valid IdentityToolkit v3 body.</param>
        /// <returns>GetOobConfirmationCodeResponseResponse</returns>
        public static GetOobConfirmationCodeResponse GetOobConfirmationCode(IdentityToolkitService service, Relyingparty body)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }
                if (body == null)
                {
                    throw new ArgumentNullException("body");
                }

                // Make the request.
                return(service.Relyingparty.GetOobConfirmationCode(body).Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request Relyingparty.GetOobConfirmationCode failed.", ex);
            }
        }
Beispiel #5
0
        /// <summary>
        /// Set project configuration.
        /// Documentation https://developers.google.com/identitytoolkit/v3/reference/relyingparty/setProjectConfig
        /// Generation Note: This does not always build corectly.  Google needs to standardise things I need to figuer out which ones are wrong.
        /// </summary>
        /// <param name="service">Authenticated IdentityToolkit service.</param>
        /// <param name="body">A valid IdentityToolkit v3 body.</param>
        /// <returns>IdentitytoolkitRelyingpartySetProjectConfigResponseResponse</returns>
        public static IdentitytoolkitRelyingpartySetProjectConfigResponse SetProjectConfig(IdentityToolkitService service, IdentitytoolkitRelyingpartySetProjectConfigRequest body)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }
                if (body == null)
                {
                    throw new ArgumentNullException("body");
                }

                // Make the request.
                return(service.Relyingparty.SetProjectConfig(body).Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request Relyingparty.SetProjectConfig failed.", ex);
            }
        }
Beispiel #6
0
        /// <summary>
        /// Get project configuration.
        /// Documentation https://developers.google.com/identitytoolkit/v3/reference/relyingparty/getProjectConfig
        /// Generation Note: This does not always build corectly.  Google needs to standardise things I need to figuer out which ones are wrong.
        /// </summary>
        /// <param name="service">Authenticated IdentityToolkit service.</param>
        /// <param name="optional">Optional paramaters.</param>        /// <returns>IdentitytoolkitRelyingpartyGetProjectConfigResponseResponse</returns>
        public static IdentitytoolkitRelyingpartyGetProjectConfigResponse GetProjectConfig(IdentityToolkitService service, RelyingpartyGetProjectConfigOptionalParms optional = null)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }

                // Building the initial request.
                var request = service.Relyingparty.GetProjectConfig();

                // Applying optional parameters to the request.
                request = (RelyingpartyResource.GetProjectConfigRequest)SampleHelpers.ApplyOptionalParms(request, optional);

                // Requesting data.
                return(request.Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request Relyingparty.GetProjectConfig failed.", ex);
            }
        }