blob: 45f8db63827a869a303a92c3ab9d9fe18ef5df7e [file] [log] [blame]
Joe Gregorio37802c32013-08-06 12:24:05 -04001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="identitytoolkit_v3.html">Google Identity Toolkit API</a> . <a href="identitytoolkit_v3.relyingparty.html">relyingparty</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#createAuthUri">createAuthUri(body)</a></code></p>
79<p class="firstline">Creates the URI used by the IdP to authenticate the user.</p>
80<p class="toc_element">
81 <code><a href="#deleteAccount">deleteAccount(body)</a></code></p>
82<p class="firstline">Delete user account.</p>
83<p class="toc_element">
84 <code><a href="#getAccountInfo">getAccountInfo(body)</a></code></p>
85<p class="firstline">Returns the account info.</p>
86<p class="toc_element">
87 <code><a href="#getOobConfirmationCode">getOobConfirmationCode(body)</a></code></p>
88<p class="firstline">Get a code for user action confirmation.</p>
89<p class="toc_element">
90 <code><a href="#resetPassword">resetPassword(body)</a></code></p>
91<p class="firstline">Set account info for a user.</p>
92<p class="toc_element">
93 <code><a href="#setAccountInfo">setAccountInfo(body)</a></code></p>
94<p class="firstline">Set account info for a user.</p>
95<p class="toc_element">
96 <code><a href="#uploadAccount">uploadAccount(body)</a></code></p>
97<p class="firstline">Batch upload existing user accounts.</p>
98<p class="toc_element">
99 <code><a href="#verifyAssertion">verifyAssertion(body)</a></code></p>
100<p class="firstline">Verifies the assertion returned by the IdP.</p>
101<p class="toc_element">
102 <code><a href="#verifyPassword">verifyPassword(body)</a></code></p>
103<p class="firstline">Verifies the user entered password.</p>
104<h3>Method Details</h3>
105<div class="method">
106 <code class="details" id="createAuthUri">createAuthUri(body)</code>
107 <pre>Creates the URI used by the IdP to authenticate the user.
108
109Args:
110 body: object, The request body. (required)
111 The object takes the form of:
112
113{ # Request to get the IDP authentication URL.
114 "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.
115 "clientId": "A String", # The relying party OAuth client ID.
116 "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.
117 "context": "A String", # The opaque value used by the client to maintain context info between the authentication request and the IDP callback.
118 "continueUri": "A String", # The URI to which the IDP redirects the user after the federated login flow.
119 "identifier": "A String", # The email or federated ID of the user.
120 }
121
122
123Returns:
124 An object of the form:
125
126 { # Response of creating the IDP authentication URL.
127 "kind": "identitytoolkit#CreateAuthUriResponse", # The fixed string identitytoolkit#CreateAuthUriResponse".
128 "providers": [ # Existing IDP's for the user.
129 "A String",
130 ],
131 "registered": True or False, # Whether the user is registered if the identifier is an email.
132 "authUri": "A String", # The URI used by the IDP to authenticate the user.
133 }</pre>
134</div>
135
136<div class="method">
137 <code class="details" id="deleteAccount">deleteAccount(body)</code>
138 <pre>Delete user account.
139
140Args:
141 body: object, The request body. (required)
142 The object takes the form of:
143
144{ # Request to delete account.
145 "localId": "A String", # The local ID of the user.
146 }
147
148
149Returns:
150 An object of the form:
151
152 { # Respone of deleting account.
153 "kind": "identitytoolkit#DeleteAccountResponse", # The fixed string "identitytoolkit#DeleteAccountResponse".
154 }</pre>
155</div>
156
157<div class="method">
158 <code class="details" id="getAccountInfo">getAccountInfo(body)</code>
159 <pre>Returns the account info.
160
161Args:
162 body: object, The request body. (required)
163 The object takes the form of:
164
165{ # Request to get the account information.
166 "idToken": "A String", # The GITKit token of the authenticated user.
167 "email": [ # The list of emails of the users to inquiry.
168 "A String",
169 ],
170 "localId": [ # The list of local ID's of the users to inquiry.
171 "A String",
172 ],
173 }
174
175
176Returns:
177 An object of the form:
178
179 { # Response of getting account information.
180 "kind": "identitytoolkit#GetAccountInfoResponse", # The fixed string "identitytoolkit#GetAccountInfoResponse".
181 "users": [ # The info of the users.
182 {
183 "displayName": "A String", # The name of the user.
184 "localId": "A String", # The local ID of the user.
185 "language": "A String", # The language of the user.
186 "photoUrl": "A String", # The URL of the user profile photo.
187 "dateOfBirth": "A String", # The user's date of birth.
188 "version": 42, # Version of the user's password.
189 "providerUserInfo": [ # The IDP of the user.
190 {
191 "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.
192 "displayName": "A String", # The user's display name at the IDP.
193 "photoUrl": "A String", # The user's photo url at the IDP.
194 },
195 ],
196 "timeZone": "A String", # The time zone of the user.
197 "passwordUpdatedAt": "A String", # The timestamp when the password was last updated.
198 "password": "A String", # The user's hashed password.
199 "salt": "A String", # The user's password salt.
200 "email": "A String", # The email returned by the IdP. NOTE: The federated login user may not own the email.
201 },
202 ],
203 }</pre>
204</div>
205
206<div class="method">
207 <code class="details" id="getOobConfirmationCode">getOobConfirmationCode(body)</code>
208 <pre>Get a code for user action confirmation.
209
210Args:
211 body: object, The request body. (required)
212 The object takes the form of:
213
214{ # Request of getting a code for user confirmation (reset password, change email etc.)
215 "kind": "identitytoolkit#relyingparty", # The fixed string "identitytoolkit#relyingparty".
216 "requestType": "A String", # The request type.
217 "idToken": "A String", # The user's Gitkit login token for email change.
218 "challenge": "A String", # The recaptcha challenge presented to the user.
219 "newEmail": "A String", # The new email if the code is for email change.
220 "userIp": "A String", # The IP address of the user.
221 "email": "A String", # The email of the user.
222 "captchaResp": "A String", # The recaptcha response from the user.
223 }
224
225
226Returns:
227 An object of the form:
228
229 { # Response of getting a code for user confirmation (reset password, change email etc.).
230 "kind": "identitytoolkit#GetOobConfirmationCodeResponse", # The fixed string "identitytoolkit#GetOobConfirmationCodeResponse".
231 "oobCode": "A String", # The code to be send to the user.
232 }</pre>
233</div>
234
235<div class="method">
236 <code class="details" id="resetPassword">resetPassword(body)</code>
237 <pre>Set account info for a user.
238
239Args:
240 body: object, The request body. (required)
241 The object takes the form of:
242
243{ # Request to reset the password.
244 "newPassword": "A String", # The new password inputted by the user.
245 "oldPassword": "A String", # The old password inputted by the user.
246 "oobCode": "A String", # The confirmation code.
247 "email": "A String", # The email address of the user.
248 }
249
250
251Returns:
252 An object of the form:
253
254 { # Response of resetting the password.
255 "kind": "identitytoolkit#ResetPasswordResponse", # The fixed string "identitytoolkit#ResetPasswordResponse".
256 "email": "A String", # The user's email.
257 }</pre>
258</div>
259
260<div class="method">
261 <code class="details" id="setAccountInfo">setAccountInfo(body)</code>
262 <pre>Set account info for a user.
263
264Args:
265 body: object, The request body. (required)
266 The object takes the form of:
267
268{ # Request to set the account information.
269 "oobCode": "A String", # The out-of-band code of the change email request.
270 "localId": "A String", # The local ID of the user.
271 "upgradeToFederatedLogin": True or False, # Mark the user to upgrade to federated login.
272 "emailVerified": True or False, # Mark the email as verified or not.
273 "provider": [ # The associated IDPs of the user.
274 "A String",
275 ],
276 "idToken": "A String", # The GITKit token of the authenticated user.
277 "displayName": "A String", # The name of the user.
278 "password": "A String", # The new password of the user.
279 "email": "A String", # The email of the user.
280 }
281
282
283Returns:
284 An object of the form:
285
286 { # Respone of setting the account information.
287 "kind": "identitytoolkit#SetAccountInfoResponse", # The fixed string "identitytoolkit#SetAccountInfoResponse".
288 "displayName": "A String", # The name of the user.
289 "email": "A String", # The email of the user.
290 "provider": [ # The associated IDPs of the user.
291 "A String",
292 ],
293 }</pre>
294</div>
295
296<div class="method">
297 <code class="details" id="uploadAccount">uploadAccount(body)</code>
298 <pre>Batch upload existing user accounts.
299
300Args:
301 body: object, The request body. (required)
302 The object takes the form of:
303
304{ # Request to upload user account in batch.
305 "hashAlgorithm": "A String",
306 "signerKey": "A String",
307 "memoryCost": 42,
308 "saltSeparator": "A String",
309 "userAccount": [ # The account info to be stored.
310 { # Template for an individual account info.
311 "kind": "identitytoolkit#userinfo", # Identifies this object as a user info.
312 "password": "A String", # password
313 "salt": "A String", # salt
314 "email": "A String", # email
315 "localId": "A String", # user's id at the site
316 },
317 ],
318 "rounds": 42,
319 }
320
321
322Returns:
323 An object of the form:
324
325 { # Respone of uploading accounts in batch.
326 "kind": "identitytoolkit#UploadAccountResponse", # The fixed string "identitytoolkit#UploadAccountResponse".
327 "error": [ # The error encountered while processing the account info.
328 {
329 "index": 42, # The index of the malformed account, starting from 0.
330 "message": "A String", # Detailed error message for the account info.
331 },
332 ],
333 }</pre>
334</div>
335
336<div class="method">
337 <code class="details" id="verifyAssertion">verifyAssertion(body)</code>
338 <pre>Verifies the assertion returned by the IdP.
339
340Args:
341 body: object, The request body. (required)
342 The object takes the form of:
343
344{ # Request to verify the IDP assertion.
345 "requestUri": "A String", # The URI to which the IDP redirects the user back. It may contain federated login result params added by the IDP.
346 "postBody": "A String", # The post body if the request is a HTTP POST.
347 "pendingIdToken": "A String", # The GITKit token for the non-trusted IDP pending to be confirmed by the user.
348 }
349
350
351Returns:
352 An object of the form:
353
354 { # Response of verifying the IDP assertion.
355 "federatedId": "A String", # The unique ID identifies the IdP account.
356 "localId": "A String", # The RP local ID if it's already been mapped to the IdP account identified by the federated ID.
357 "photoUrl": "A String", # The URI of the public accessible profiel picture.
358 "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.
359 "verifiedProvider": [ # When action is 'map', contains the idps which can be used for confirmation.
360 "A String",
361 ],
362 "originalEmail": "A String", # The original email stored in the mapping storage. It's returned when the federated ID is associated to a different email.
363 "dateOfBirth": "A String", # The birth date of the IdP account.
364 "nickName": "A String", # The nick name of the user.
365 "email": "A String", # The email returned by the IdP. NOTE: The federated login user may not own the email.
366 "idToken": "A String", # The ID token.
367 "fullName": "A String", # The full name of the user.
368 "kind": "identitytoolkit#VerifyAssertionResponse", # The fixed string "identitytoolkit#VerifyAssertionResponse".
369 "displayName": "A String", # The display name of the user.
370 "firstName": "A String", # The first name of the user.
371 "language": "A String", # The language preference of the user.
372 "emailVerified": True or False, # The value is true if the IDP is also the email provider. It means the user owns the email.
373 "oauthScope": "A String", # The scope for the OpenID OAuth extension.
374 "oauthRequestToken": "A String", # The user approved request token for the OpenID OAuth extension.
375 "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.
376 "context": "A String", # The opaque value used by the client to maintain context info between the authentication request and the IDP callback.
377 "lastName": "A String", # The last name of the user.
378 "action": "A String", # The action code.
379 "timeZone": "A String", # The timezone of the user.
380 "emailRecycled": True or False, # It's true if the email is recycled.
381 }</pre>
382</div>
383
384<div class="method">
385 <code class="details" id="verifyPassword">verifyPassword(body)</code>
386 <pre>Verifies the user entered password.
387
388Args:
389 body: object, The request body. (required)
390 The object takes the form of:
391
392{ # Request to verify the password.
393 "password": "A String", # The password inputed by the user.
394 "email": "A String", # The email of the user.
395 "pendingIdToken": "A String", # The GITKit token for the non-trusted IDP, which is to be confirmed by the user.
396 }
397
398
399Returns:
400 An object of the form:
401
402 { # Request of verifying the password.
403 "kind": "identitytoolkit#VerifyPasswordResponse", # The fixed string "identitytoolkit#VerifyPasswordResponse".
404 "displayName": "A String", # The name of the user.
405 "localId": "A String", # The RP local ID if it's already been mapped to the IdP account identified by the federated ID.
406 "idToken": "A String", # The GITKit token for authenticated user.
407 "registered": True or False, # Whether the email is registered.
408 "email": "A String", # The email returned by the IdP. NOTE: The federated login user may not own the email.
409 }</pre>
410</div>
411
412</body></html>