# Google Identity Toolkit API . relyingparty

## Instance Methods

Creates the URI used by the IdP to authenticate the user.

Delete user account.

Returns the account info.

Get a code for user action confirmation.

Set account info for a user.

Set account info for a user.

Batch upload existing user accounts.

Verifies the assertion returned by the IdP.

Verifies the user entered password.

### Method Details

`createAuthUri(body)`

    Creates the URI used by the IdP to authenticate the user.

    Args:
      body: object, The request body. (required)
        The object takes the form of:

    { # Request to get the IDP authentication URL.
        "openidRealm": "A String", # Optional realm for OpenID protocol. The sub string "scheme://domain:port" of the param "continueUri" is used if this is not set.
        "clientId": "A String", # The relying party OAuth client ID.
        "providerId": "A String", # The IdP ID. For white listed IdPs it's a short domain name e.g. google.com, aol.com, live.net and yahoo.com. For other OpenID IdPs it's the OP identifier.
        "context": "A String", # The opaque value used by the client to maintain context info between the authentication request and the IDP callback.
        "continueUri": "A String", # The URI to which the IDP redirects the user after the federated login flow.
        "identifier": "A String", # The email or federated ID of the user.
      }

    Returns:
      An object of the form:

        { # Response of creating the IDP authentication URL.
        "kind": "identitytoolkit#CreateAuthUriResponse", # The fixed string identitytoolkit#CreateAuthUriResponse".
        "providers": [ # Existing IDP's for the user.
          "A String",
        ],
        "registered": True or False, # Whether the user is registered if the identifier is an email.
        "authUri": "A String", # The URI used by the IDP to authenticate the user.
      }

`deleteAccount(body)`

    Delete user account.

    Args:
      body: object, The request body. (required)
        The object takes the form of:

    { # Request to delete account.
        "localId": "A String", # The local ID of the user.
      }

    Returns:
      An object of the form:

        { # Respone of deleting account.
        "kind": "identitytoolkit#DeleteAccountResponse", # The fixed string "identitytoolkit#DeleteAccountResponse".
      }

`getAccountInfo(body)`

    Returns the account info.

    Args:
      body: object, The request body. (required)
        The object takes the form of:

    { # Request to get the account information.
        "idToken": "A String", # The GITKit token of the authenticated user.
        "email": [ # The list of emails of the users to inquiry.
          "A String",
        ],
        "localId": [ # The list of local ID's of the users to inquiry.
          "A String",
        ],
      }

    Returns:
      An object of the form:

        { # Response of getting account information.
        "kind": "identitytoolkit#GetAccountInfoResponse", # The fixed string "identitytoolkit#GetAccountInfoResponse".
        "users": [ # The info of the users.
          {
            "displayName": "A String", # The name of the user.
            "localId": "A String", # The local ID of the user.
            "language": "A String", # The language of the user.
            "photoUrl": "A String", # The URL of the user profile photo.
            "dateOfBirth": "A String", # The user's date of birth.
            "version": 42, # Version of the user's password.
            "providerUserInfo": [ # The IDP of the user.
              {
                "providerId": "A String", # The IdP ID. For white listed IdPs it's a short domain name, e.g., google.com, aol.com, live.net and yahoo.com. For other OpenID IdPs it's the OP identifier.
                "displayName": "A String", # The user's display name at the IDP.
                "photoUrl": "A String", # The user's photo url at the IDP.
              },
            ],
            "timeZone": "A String", # The time zone of the user.
            "passwordUpdatedAt": "A String", # The timestamp when the password was last updated.
            "password": "A String", # The user's hashed password.
            "salt": "A String", # The user's password salt.
            "email": "A String", # The email returned by the IdP. NOTE: The federated login user may not own the email.
          },
        ],
      }

`getOobConfirmationCode(body)`

    Get a code for user action confirmation.

    Args:
      body: object, The request body. (required)
        The object takes the form of:

    { # Request of getting a code for user confirmation (reset password, change email etc.)
        "kind": "identitytoolkit#relyingparty", # The fixed string "identitytoolkit#relyingparty".
        "requestType": "A String", # The request type.
        "idToken": "A String", # The user's Gitkit login token for email change.
        "challenge": "A String", # The recaptcha challenge presented to the user.
        "newEmail": "A String", # The new email if the code is for email change.
        "userIp": "A String", # The IP address of the user.
        "email": "A String", # The email of the user.
        "captchaResp": "A String", # The recaptcha response from the user.
      }

    Returns:
      An object of the form:

        { # Response of getting a code for user confirmation (reset password, change email etc.).
        "kind": "identitytoolkit#GetOobConfirmationCodeResponse", # The fixed string "identitytoolkit#GetOobConfirmationCodeResponse".
        "oobCode": "A String", # The code to be send to the user.
      }

`resetPassword(body)`

    Set account info for a user.

    Args:
      body: object, The request body. (required)
        The object takes the form of:

    { # Request to reset the password.
        "newPassword": "A String", # The new password inputted by the user.
        "oldPassword": "A String", # The old password inputted by the user.
        "oobCode": "A String", # The confirmation code.
        "email": "A String", # The email address of the user.
      }

    Returns:
      An object of the form:

        { # Response of resetting the password.
        "kind": "identitytoolkit#ResetPasswordResponse", # The fixed string "identitytoolkit#ResetPasswordResponse".
        "email": "A String", # The user's email.
      }

`setAccountInfo(body)`

    Set account info for a user.

    Args:
      body: object, The request body. (required)
        The object takes the form of:

    { # Request to set the account information.
        "oobCode": "A String", # The out-of-band code of the change email request.
        "localId": "A String", # The local ID of the user.
        "upgradeToFederatedLogin": True or False, # Mark the user to upgrade to federated login.
        "emailVerified": True or False, # Mark the email as verified or not.
        "provider": [ # The associated IDPs of the user.
          "A String",
        ],
        "idToken": "A String", # The GITKit token of the authenticated user.
        "displayName": "A String", # The name of the user.
        "password": "A String", # The new password of the user.
        "email": "A String", # The email of the user.
      }

    Returns:
      An object of the form:

        { # Respone of setting the account information.
        "kind": "identitytoolkit#SetAccountInfoResponse", # The fixed string "identitytoolkit#SetAccountInfoResponse".
        "displayName": "A String", # The name of the user.
        "email": "A String", # The email of the user.
        "provider": [ # The associated IDPs of the user.
          "A String",
        ],
      }

`uploadAccount(body)`

    Batch upload existing user accounts.

    Args:
      body: object, The request body. (required)
        The object takes the form of:

    { # Request to upload user account in batch.
        "hashAlgorithm": "A String",
        "signerKey": "A String",
        "memoryCost": 42,
        "saltSeparator": "A String",
        "userAccount": [ # The account info to be stored.
          { # Template for an individual account info.
            "kind": "identitytoolkit#userinfo", # Identifies this object as a user info.
            "password": "A String", # password
            "salt": "A String", # salt
            "email": "A String", # email
            "localId": "A String", # user's id at the site
          },
        ],
        "rounds": 42,
      }

    Returns:
      An object of the form:

        { # Respone of uploading accounts in batch.
        "kind": "identitytoolkit#UploadAccountResponse", # The fixed string "identitytoolkit#UploadAccountResponse".
        "error": [ # The error encountered while processing the account info.
          {
            "index": 42, # The index of the malformed account, starting from 0.
            "message": "A String", # Detailed error message for the account info.
          },
        ],
      }

`verifyAssertion(body)`

    Verifies the assertion returned by the IdP.

    Args:
      body: object, The request body. (required)
        The object takes the form of:

    { # Request to verify the IDP assertion.
        "requestUri": "A String", # The URI to which the IDP redirects the user back. It may contain federated login result params added by the IDP.
        "postBody": "A String", # The post body if the request is a HTTP POST.
        "pendingIdToken": "A String", # The GITKit token for the non-trusted IDP pending to be confirmed by the user.
      }

    Returns:
      An object of the form:

        { # Response of verifying the IDP assertion.
        "federatedId": "A String", # The unique ID identifies the IdP account.
        "localId": "A String", # The RP local ID if it's already been mapped to the IdP account identified by the federated ID.
        "photoUrl": "A String", # The URI of the public accessible profiel picture.
        "inputEmail": "A String", # It's the identifier param in the createAuthUri request if the identifier is an email. It can be used to check whether the user input email is different from the asserted email.
        "verifiedProvider": [ # When action is 'map', contains the idps which can be used for confirmation.
          "A String",
        ],
        "originalEmail": "A String", # The original email stored in the mapping storage. It's returned when the federated ID is associated to a different email.
        "dateOfBirth": "A String", # The birth date of the IdP account.
        "nickName": "A String", # The nick name of the user.
        "email": "A String", # The email returned by the IdP. NOTE: The federated login user may not own the email.
        "idToken": "A String", # The ID token.
        "fullName": "A String", # The full name of the user.
        "kind": "identitytoolkit#VerifyAssertionResponse", # The fixed string "identitytoolkit#VerifyAssertionResponse".
        "displayName": "A String", # The display name of the user.
        "firstName": "A String", # The first name of the user.
        "language": "A String", # The language preference of the user.
        "emailVerified": True or False, # The value is true if the IDP is also the email provider. It means the user owns the email.
        "oauthScope": "A String", # The scope for the OpenID OAuth extension.
        "oauthRequestToken": "A String", # The user approved request token for the OpenID OAuth extension.
        "providerId": "A String", # The IdP ID. For white listed IdPs it's a short domain name e.g. google.com, aol.com, live.net and yahoo.com. If the "providerId" param is set to OpenID OP identifer other than the whilte listed IdPs the OP identifier is returned. If the "identifier" param is federated ID in the createAuthUri request. The domain part of the federated ID is returned.
        "context": "A String", # The opaque value used by the client to maintain context info between the authentication request and the IDP callback.
        "lastName": "A String", # The last name of the user.
        "action": "A String", # The action code.
        "timeZone": "A String", # The timezone of the user.
        "emailRecycled": True or False, # It's true if the email is recycled.
      }

`verifyPassword(body)`

    Verifies the user entered password.

    Args:
      body: object, The request body. (required)
        The object takes the form of:

    { # Request to verify the password.
        "password": "A String", # The password inputed by the user.
        "email": "A String", # The email of the user.
        "pendingIdToken": "A String", # The GITKit token for the non-trusted IDP, which is to be confirmed by the user.
      }

    Returns:
      An object of the form:

        { # Request of verifying the password.
        "kind": "identitytoolkit#VerifyPasswordResponse", # The fixed string "identitytoolkit#VerifyPasswordResponse".
        "displayName": "A String", # The name of the user.
        "localId": "A String", # The RP local ID if it's already been mapped to the IdP account identified by the federated ID.
        "idToken": "A String", # The GITKit token for authenticated user.
        "registered": True or False, # Whether the email is registered.
        "email": "A String", # The email returned by the IdP. NOTE: The federated login user may not own the email.
      }