Skip to content

Commit

Permalink
feat(firebaseappcheck): update the api
Browse files Browse the repository at this point in the history
#### firebaseappcheck:v1

The following keys were added:
- resources.projects.resources.apps.methods.exchangeSafetyNetToken.deprecated (Total Keys: 1)
- resources.projects.resources.apps.resources.safetyNetConfig.methods.batchGet.deprecated (Total Keys: 1)
- resources.projects.resources.apps.resources.safetyNetConfig.methods.get.deprecated (Total Keys: 1)
- resources.projects.resources.apps.resources.safetyNetConfig.methods.patch.deprecated (Total Keys: 1)

#### firebaseappcheck:v1beta

The following keys were added:
- resources.projects.methods.verifyAppCheckToken (Total Keys: 12)
- resources.projects.resources.apps.methods.exchangeRecaptchaToken.deprecated (Total Keys: 1)
- resources.projects.resources.apps.methods.exchangeSafetyNetToken.deprecated (Total Keys: 1)
- resources.projects.resources.apps.resources.recaptchaConfig.methods.batchGet.deprecated (Total Keys: 1)
- resources.projects.resources.apps.resources.recaptchaConfig.methods.get.deprecated (Total Keys: 1)
- resources.projects.resources.apps.resources.recaptchaConfig.methods.patch.deprecated (Total Keys: 1)
- resources.projects.resources.apps.resources.safetyNetConfig.methods.batchGet.deprecated (Total Keys: 1)
- resources.projects.resources.apps.resources.safetyNetConfig.methods.get.deprecated (Total Keys: 1)
- resources.projects.resources.apps.resources.safetyNetConfig.methods.patch.deprecated (Total Keys: 1)
- schemas.GoogleFirebaseAppcheckV1betaVerifyAppCheckTokenRequest (Total Keys: 3)
- schemas.GoogleFirebaseAppcheckV1betaVerifyAppCheckTokenResponse (Total Keys: 3)
  • Loading branch information
yoshi-automation committed May 24, 2023
1 parent 54c78cf commit 458baf2
Show file tree
Hide file tree
Showing 3 changed files with 96 additions and 2 deletions.
29 changes: 29 additions & 0 deletions docs/dyn/firebaseappcheck_v1beta.projects.html
Expand Up @@ -87,10 +87,39 @@ <h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<p class="toc_element">
<code><a href="#verifyAppCheckToken">verifyAppCheckToken(project, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Verifies the given App Check token and returns token usage signals that callers may act upon. This method currently only supports App Check tokens exchanged from the following attestation providers: * Play Integrity API * App Attest * DeviceCheck (`DCDevice` tokens) * reCAPTCHA Enterprise * reCAPTCHA v3 * Custom providers App Check tokens exchanged from debug secrets are also supported. Calling this method on an otherwise valid App Check token with an unsupported provider will cause an HTTP 400 error to be returned. Returns whether this token was already consumed before this call. If this is the first time this method has seen the given App Check token, the field `already_consumed` in the response will be absent. The given token will then be marked as `already_consumed` (set to `true`) for all future invocations of this method for that token. Note that if the given App Check token is invalid, an HTTP 403 error is returned instead of a response object, regardless whether the token was already consumed. Currently, when evaluating whether an App Check token was already consumed, only calls to this exact method are counted. Use of the App Check token elsewhere will not mark the token as being already consumed. The caller must have the [`firebaseappcheck.appCheckTokens.verify`](https://firebase.google.com/docs/projects/iam/permissions#app-check) permission to call this method. This permission is part of the [Firebase App Check Token Verifier role](https://firebase.google.com/docs/projects/iam/roles-predefined-product#app-check).</p>
<h3>Method Details</h3>
<div class="method">
<code class="details" id="close">close()</code>
<pre>Close httplib2 connections.</pre>
</div>

<div class="method">
<code class="details" id="verifyAppCheckToken">verifyAppCheckToken(project, body=None, x__xgafv=None)</code>
<pre>Verifies the given App Check token and returns token usage signals that callers may act upon. This method currently only supports App Check tokens exchanged from the following attestation providers: * Play Integrity API * App Attest * DeviceCheck (`DCDevice` tokens) * reCAPTCHA Enterprise * reCAPTCHA v3 * Custom providers App Check tokens exchanged from debug secrets are also supported. Calling this method on an otherwise valid App Check token with an unsupported provider will cause an HTTP 400 error to be returned. Returns whether this token was already consumed before this call. If this is the first time this method has seen the given App Check token, the field `already_consumed` in the response will be absent. The given token will then be marked as `already_consumed` (set to `true`) for all future invocations of this method for that token. Note that if the given App Check token is invalid, an HTTP 403 error is returned instead of a response object, regardless whether the token was already consumed. Currently, when evaluating whether an App Check token was already consumed, only calls to this exact method are counted. Use of the App Check token elsewhere will not mark the token as being already consumed. The caller must have the [`firebaseappcheck.appCheckTokens.verify`](https://firebase.google.com/docs/projects/iam/permissions#app-check) permission to call this method. This permission is part of the [Firebase App Check Token Verifier role](https://firebase.google.com/docs/projects/iam/roles-predefined-product#app-check).

Args:
project: string, Required. The relative resource name of the project for which the token was minted, in the format: ``` projects/{project_number} ``` If necessary, the `project_number` element can be replaced with the project ID of the Firebase project. Learn more about using project identifiers in Google&#x27;s [AIP 2510](https://google.aip.dev/cloud/2510) standard. (required)
body: object, The request body.
The object takes the form of:

{ # Request message for the VerifyAppCheckToken method.
&quot;appCheckToken&quot;: &quot;A String&quot;, # Required. The App Check token to verify. App Check tokens exchanged from the SafetyNet provider are not supported; an HTTP 400 error will be returned.
}

x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format

Returns:
An object of the form:

{ # Response message for the VerifyAppCheckToken method.
&quot;alreadyConsumed&quot;: True or False, # Whether this token was already consumed. If this is the first time this method has seen the given App Check token, this field will be omitted from the response. The given token will then be marked as `already_consumed` (set to `true`) for all future invocations of this method for that token. Note that if the given App Check token is invalid, an HTTP 403 error is returned instead of a response containing this field, regardless whether the token was already consumed.
}</pre>
</div>

</body></html>
Expand Up @@ -375,6 +375,7 @@
]
},
"exchangeSafetyNetToken": {
"deprecated": true,
"description": "Validates a [SafetyNet token](https://developer.android.com/training/safetynet/attestation#request-attestation-step). If valid, returns an AppCheckToken.",
"flatPath": "v1/projects/{projectsId}/apps/{appsId}:exchangeSafetyNetToken",
"httpMethod": "POST",
Expand Down Expand Up @@ -1108,6 +1109,7 @@
"safetyNetConfig": {
"methods": {
"batchGet": {
"deprecated": true,
"description": "Atomically gets the SafetyNetConfigs for the specified list of apps.",
"flatPath": "v1/projects/{projectsId}/apps/-/safetyNetConfig:batchGet",
"httpMethod": "GET",
Expand Down Expand Up @@ -1140,6 +1142,7 @@
]
},
"get": {
"deprecated": true,
"description": "Gets the SafetyNetConfig for the specified app.",
"flatPath": "v1/projects/{projectsId}/apps/{appsId}/safetyNetConfig",
"httpMethod": "GET",
Expand All @@ -1166,6 +1169,7 @@
]
},
"patch": {
"deprecated": true,
"description": "Updates the SafetyNetConfig for the specified app. While this configuration is incomplete or invalid, the app will be unable to exchange SafetyNet tokens for App Check tokens.",
"flatPath": "v1/projects/{projectsId}/apps/{appsId}/safetyNetConfig",
"httpMethod": "PATCH",
Expand Down Expand Up @@ -1338,7 +1342,7 @@
}
}
},
"revision": "20230410",
"revision": "20230515",
"rootUrl": "https://firebaseappcheck.googleapis.com/",
"schemas": {
"GoogleFirebaseAppcheckV1AppAttestConfig": {
Expand Down
Expand Up @@ -139,6 +139,37 @@
}
},
"projects": {
"methods": {
"verifyAppCheckToken": {
"description": "Verifies the given App Check token and returns token usage signals that callers may act upon. This method currently only supports App Check tokens exchanged from the following attestation providers: * Play Integrity API * App Attest * DeviceCheck (`DCDevice` tokens) * reCAPTCHA Enterprise * reCAPTCHA v3 * Custom providers App Check tokens exchanged from debug secrets are also supported. Calling this method on an otherwise valid App Check token with an unsupported provider will cause an HTTP 400 error to be returned. Returns whether this token was already consumed before this call. If this is the first time this method has seen the given App Check token, the field `already_consumed` in the response will be absent. The given token will then be marked as `already_consumed` (set to `true`) for all future invocations of this method for that token. Note that if the given App Check token is invalid, an HTTP 403 error is returned instead of a response object, regardless whether the token was already consumed. Currently, when evaluating whether an App Check token was already consumed, only calls to this exact method are counted. Use of the App Check token elsewhere will not mark the token as being already consumed. The caller must have the [`firebaseappcheck.appCheckTokens.verify`](https://firebase.google.com/docs/projects/iam/permissions#app-check) permission to call this method. This permission is part of the [Firebase App Check Token Verifier role](https://firebase.google.com/docs/projects/iam/roles-predefined-product#app-check).",
"flatPath": "v1beta/projects/{projectsId}:verifyAppCheckToken",
"httpMethod": "POST",
"id": "firebaseappcheck.projects.verifyAppCheckToken",
"parameterOrder": [
"project"
],
"parameters": {
"project": {
"description": "Required. The relative resource name of the project for which the token was minted, in the format: ``` projects/{project_number} ``` If necessary, the `project_number` element can be replaced with the project ID of the Firebase project. Learn more about using project identifiers in Google's [AIP 2510](https://google.aip.dev/cloud/2510) standard.",
"location": "path",
"pattern": "^projects/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1beta/{+project}:verifyAppCheckToken",
"request": {
"$ref": "GoogleFirebaseAppcheckV1betaVerifyAppCheckTokenRequest"
},
"response": {
"$ref": "GoogleFirebaseAppcheckV1betaVerifyAppCheckTokenResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/firebase"
]
}
},
"resources": {
"apps": {
"methods": {
Expand Down Expand Up @@ -346,6 +377,7 @@
]
},
"exchangeRecaptchaToken": {
"deprecated": true,
"description": "Validates a [reCAPTCHA v3 response token](https://developers.google.com/recaptcha/docs/v3). If valid, returns an AppCheckToken.",
"flatPath": "v1beta/projects/{projectsId}/apps/{appsId}:exchangeRecaptchaToken",
"httpMethod": "POST",
Expand Down Expand Up @@ -404,6 +436,7 @@
]
},
"exchangeSafetyNetToken": {
"deprecated": true,
"description": "Validates a [SafetyNet token](https://developer.android.com/training/safetynet/attestation#request-attestation-step). If valid, returns an AppCheckToken.",
"flatPath": "v1beta/projects/{projectsId}/apps/{appsId}:exchangeSafetyNetToken",
"httpMethod": "POST",
Expand Down Expand Up @@ -943,6 +976,7 @@
"recaptchaConfig": {
"methods": {
"batchGet": {
"deprecated": true,
"description": "Atomically gets the RecaptchaConfigs for the specified list of apps. For security reasons, the `site_secret` field is never populated in the response.",
"flatPath": "v1beta/projects/{projectsId}/apps/-/recaptchaConfig:batchGet",
"httpMethod": "GET",
Expand Down Expand Up @@ -975,6 +1009,7 @@
]
},
"get": {
"deprecated": true,
"description": "Gets the RecaptchaConfig for the specified app. For security reasons, the `site_secret` field is never populated in the response.",
"flatPath": "v1beta/projects/{projectsId}/apps/{appsId}/recaptchaConfig",
"httpMethod": "GET",
Expand All @@ -1001,6 +1036,7 @@
]
},
"patch": {
"deprecated": true,
"description": "Updates the RecaptchaConfig for the specified app. While this configuration is incomplete or invalid, the app will be unable to exchange reCAPTCHA tokens for App Check tokens. For security reasons, the `site_secret` field is never populated in the response.",
"flatPath": "v1beta/projects/{projectsId}/apps/{appsId}/recaptchaConfig",
"httpMethod": "PATCH",
Expand Down Expand Up @@ -1234,6 +1270,7 @@
"safetyNetConfig": {
"methods": {
"batchGet": {
"deprecated": true,
"description": "Atomically gets the SafetyNetConfigs for the specified list of apps.",
"flatPath": "v1beta/projects/{projectsId}/apps/-/safetyNetConfig:batchGet",
"httpMethod": "GET",
Expand Down Expand Up @@ -1266,6 +1303,7 @@
]
},
"get": {
"deprecated": true,
"description": "Gets the SafetyNetConfig for the specified app.",
"flatPath": "v1beta/projects/{projectsId}/apps/{appsId}/safetyNetConfig",
"httpMethod": "GET",
Expand All @@ -1292,6 +1330,7 @@
]
},
"patch": {
"deprecated": true,
"description": "Updates the SafetyNetConfig for the specified app. While this configuration is incomplete or invalid, the app will be unable to exchange SafetyNet tokens for App Check tokens.",
"flatPath": "v1beta/projects/{projectsId}/apps/{appsId}/safetyNetConfig",
"httpMethod": "PATCH",
Expand Down Expand Up @@ -1464,7 +1503,7 @@
}
}
},
"revision": "20230410",
"revision": "20230515",
"rootUrl": "https://firebaseappcheck.googleapis.com/",
"schemas": {
"GoogleFirebaseAppcheckV1betaAppAttestConfig": {
Expand Down Expand Up @@ -2119,6 +2158,28 @@
},
"type": "object"
},
"GoogleFirebaseAppcheckV1betaVerifyAppCheckTokenRequest": {
"description": "Request message for the VerifyAppCheckToken method.",
"id": "GoogleFirebaseAppcheckV1betaVerifyAppCheckTokenRequest",
"properties": {
"appCheckToken": {
"description": "Required. The App Check token to verify. App Check tokens exchanged from the SafetyNet provider are not supported; an HTTP 400 error will be returned.",
"type": "string"
}
},
"type": "object"
},
"GoogleFirebaseAppcheckV1betaVerifyAppCheckTokenResponse": {
"description": "Response message for the VerifyAppCheckToken method.",
"id": "GoogleFirebaseAppcheckV1betaVerifyAppCheckTokenResponse",
"properties": {
"alreadyConsumed": {
"description": "Whether this token was already consumed. If this is the first time this method has seen the given App Check token, this field will be omitted from the response. The given token will then be marked as `already_consumed` (set to `true`) for all future invocations of this method for that token. Note that if the given App Check token is invalid, an HTTP 403 error is returned instead of a response containing this field, regardless whether the token was already consumed.",
"type": "boolean"
}
},
"type": "object"
},
"GoogleProtobufEmpty": {
"description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }",
"id": "GoogleProtobufEmpty",
Expand Down

0 comments on commit 458baf2

Please sign in to comment.