Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Add the following lines to your `pom.xml` file:
<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-firebaseappcheck</artifactId>
<version>v1-rev20260717-2.0.0</version>
<version>v1-rev20260822-2.0.0</version>
</dependency>
</dependencies>
</project>
Expand All @@ -35,7 +35,7 @@ repositories {
mavenCentral()
}
dependencies {
implementation 'com.google.apis:google-api-services-firebaseappcheck:v1-rev20260717-2.0.0'
implementation 'com.google.apis:google-api-services-firebaseappcheck:v1-rev20260822-2.0.0'
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2535,6 +2535,165 @@ public GeneratePlayIntegrityChallenge set(String parameterName, Object value) {
return (GeneratePlayIntegrityChallenge) super.set(parameterName, value);
}
}
/**
* Mints a new App Check token for the specified Firebase App. This method is intended to be called
* from a privileged environment where the caller can be authorized via Cloud IAM; for example,
* using a service account. To call this method, the caller must have the [`firebaseappcheck.googlea
* pis.com/tokens.mint`](https://firebase.google.com/docs/projects/iam/permissions#app-check)
* permission. Returns a MintAppCheckTokenResponse.
*
* Create a request for the method "apps.mintAppCheckToken".
*
* This request holds the parameters needed by the firebaseappcheck server. After setting any
* optional parameters, call the {@link MintAppCheckToken#execute()} method to invoke the remote
* operation.
*
* @param app Required. The relative resource name of the app, in the format: ```
* projects/{project_number}/apps/{app_id} ``` 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.
* @param content the {@link com.google.api.services.firebaseappcheck.v1.model.GoogleFirebaseAppcheckV1MintAppCheckTokenRequest}
* @return the request
*/
public MintAppCheckToken mintAppCheckToken(java.lang.String app, com.google.api.services.firebaseappcheck.v1.model.GoogleFirebaseAppcheckV1MintAppCheckTokenRequest content) throws java.io.IOException {
MintAppCheckToken result = new MintAppCheckToken(app, content);
initialize(result);
return result;
}

public class MintAppCheckToken extends FirebaseappcheckRequest<com.google.api.services.firebaseappcheck.v1.model.GoogleFirebaseAppcheckV1MintAppCheckTokenResponse> {

private static final String REST_PATH = "v1/{+app}:mintAppCheckToken";

private final java.util.regex.Pattern APP_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/apps/[^/]+$");

/**
* Mints a new App Check token for the specified Firebase App. This method is intended to be
* called from a privileged environment where the caller can be authorized via Cloud IAM; for
* example, using a service account. To call this method, the caller must have the [`firebaseappch
* eck.googleapis.com/tokens.mint`](https://firebase.google.com/docs/projects/iam/permissions#app-
* check) permission. Returns a MintAppCheckTokenResponse.
*
* Create a request for the method "apps.mintAppCheckToken".
*
* This request holds the parameters needed by the the firebaseappcheck server. After setting any
* optional parameters, call the {@link MintAppCheckToken#execute()} method to invoke the remote
* operation. <p> {@link MintAppCheckToken#initialize(com.google.api.client.googleapis.services.Ab
* stractGoogleClientRequest)} must be called to initialize this instance immediately after
* invoking the constructor. </p>
*
* @param app Required. The relative resource name of the app, in the format: ```
* projects/{project_number}/apps/{app_id} ``` 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.
* @param content the {@link com.google.api.services.firebaseappcheck.v1.model.GoogleFirebaseAppcheckV1MintAppCheckTokenRequest}
* @since 1.13
*/
protected MintAppCheckToken(java.lang.String app, com.google.api.services.firebaseappcheck.v1.model.GoogleFirebaseAppcheckV1MintAppCheckTokenRequest content) {
super(Firebaseappcheck.this, "POST", REST_PATH, content, com.google.api.services.firebaseappcheck.v1.model.GoogleFirebaseAppcheckV1MintAppCheckTokenResponse.class);
this.app = com.google.api.client.util.Preconditions.checkNotNull(app, "Required parameter app must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(APP_PATTERN.matcher(app).matches(),
"Parameter app must conform to the pattern " +
"^projects/[^/]+/apps/[^/]+$");
}
}

@Override
public MintAppCheckToken set$Xgafv(java.lang.String $Xgafv) {
return (MintAppCheckToken) super.set$Xgafv($Xgafv);
}

@Override
public MintAppCheckToken setAccessToken(java.lang.String accessToken) {
return (MintAppCheckToken) super.setAccessToken(accessToken);
}

@Override
public MintAppCheckToken setAlt(java.lang.String alt) {
return (MintAppCheckToken) super.setAlt(alt);
}

@Override
public MintAppCheckToken setCallback(java.lang.String callback) {
return (MintAppCheckToken) super.setCallback(callback);
}

@Override
public MintAppCheckToken setFields(java.lang.String fields) {
return (MintAppCheckToken) super.setFields(fields);
}

@Override
public MintAppCheckToken setKey(java.lang.String key) {
return (MintAppCheckToken) super.setKey(key);
}

@Override
public MintAppCheckToken setOauthToken(java.lang.String oauthToken) {
return (MintAppCheckToken) super.setOauthToken(oauthToken);
}

@Override
public MintAppCheckToken setPrettyPrint(java.lang.Boolean prettyPrint) {
return (MintAppCheckToken) super.setPrettyPrint(prettyPrint);
}

@Override
public MintAppCheckToken setQuotaUser(java.lang.String quotaUser) {
return (MintAppCheckToken) super.setQuotaUser(quotaUser);
}

@Override
public MintAppCheckToken setUploadType(java.lang.String uploadType) {
return (MintAppCheckToken) super.setUploadType(uploadType);
}

@Override
public MintAppCheckToken setUploadProtocol(java.lang.String uploadProtocol) {
return (MintAppCheckToken) super.setUploadProtocol(uploadProtocol);
}

/**
* Required. The relative resource name of the app, in the format: ```
* projects/{project_number}/apps/{app_id} ``` 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.
*/
@com.google.api.client.util.Key
private java.lang.String app;

/** Required. The relative resource name of the app, in the format: ```
projects/{project_number}/apps/{app_id} ``` 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.
*/
public java.lang.String getApp() {
return app;
}

/**
* Required. The relative resource name of the app, in the format: ```
* projects/{project_number}/apps/{app_id} ``` 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.
*/
public MintAppCheckToken setApp(java.lang.String app) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(APP_PATTERN.matcher(app).matches(),
"Parameter app must conform to the pattern " +
"^projects/[^/]+/apps/[^/]+$");
}
this.app = app;
return this;
}

@Override
public MintAppCheckToken set(String parameterName, Object value) {
return (MintAppCheckToken) super.set(parameterName, value);
}
}

/**
* An accessor for creating requests from the AppAttestConfig collection.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
/*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
/*
* This code was generated by https://github.com/googleapis/google-api-java-client-services/
* Modify at your own risk.
*/

package com.google.api.services.firebaseappcheck.v1.model;

/**
* Configuration for a limited-use App Check token.
*
* <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
* transmitted over HTTP when working with the Firebase App Check API. For a detailed explanation
* see:
* <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
* </p>
*
* @author Google, Inc.
*/
@SuppressWarnings("javadoc")
public final class GoogleFirebaseAppcheckV1LimitedUseConfig extends com.google.api.client.json.GenericJson {

/**
* Optional. Specifies the desired `jti` claim (Section 4.1.7 of RFC 7519) in the returned App
* Check token. Limited-use App Check tokens with the same `jti` will be counted as the same token
* for the purposes of replay protection. The size of this field is limited to 500 bytes. If
* specified, its length must be at least 16 bytes. If this field is omitted or is empty, a
* randomly generated `jti` claim with length between 16 and 500 bytes (inclusive) will be used in
* the returned App Check token. Leaving this field empty is only recommended if your custom
* attestation provider itself is not vulnerable to replay attacks.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String jti;

/**
* Optional. Specifies the desired `jti` claim (Section 4.1.7 of RFC 7519) in the returned App
* Check token. Limited-use App Check tokens with the same `jti` will be counted as the same token
* for the purposes of replay protection. The size of this field is limited to 500 bytes. If
* specified, its length must be at least 16 bytes. If this field is omitted or is empty, a
* randomly generated `jti` claim with length between 16 and 500 bytes (inclusive) will be used in
* the returned App Check token. Leaving this field empty is only recommended if your custom
* attestation provider itself is not vulnerable to replay attacks.
* @return value or {@code null} for none
*/
public java.lang.String getJti() {
return jti;
}

/**
* Optional. Specifies the desired `jti` claim (Section 4.1.7 of RFC 7519) in the returned App
* Check token. Limited-use App Check tokens with the same `jti` will be counted as the same token
* for the purposes of replay protection. The size of this field is limited to 500 bytes. If
* specified, its length must be at least 16 bytes. If this field is omitted or is empty, a
* randomly generated `jti` claim with length between 16 and 500 bytes (inclusive) will be used in
* the returned App Check token. Leaving this field empty is only recommended if your custom
* attestation provider itself is not vulnerable to replay attacks.
* @param jti jti or {@code null} for none
*/
public GoogleFirebaseAppcheckV1LimitedUseConfig setJti(java.lang.String jti) {
this.jti = jti;
return this;
}

@Override
public GoogleFirebaseAppcheckV1LimitedUseConfig set(String fieldName, Object value) {
return (GoogleFirebaseAppcheckV1LimitedUseConfig) super.set(fieldName, value);
}

@Override
public GoogleFirebaseAppcheckV1LimitedUseConfig clone() {
return (GoogleFirebaseAppcheckV1LimitedUseConfig) super.clone();
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
/*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
/*
* This code was generated by https://github.com/googleapis/google-api-java-client-services/
* Modify at your own risk.
*/

package com.google.api.services.firebaseappcheck.v1.model;

/**
* Request message for the MintAppCheckToken method.
*
* <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
* transmitted over HTTP when working with the Firebase App Check API. For a detailed explanation
* see:
* <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
* </p>
*
* @author Google, Inc.
*/
@SuppressWarnings("javadoc")
public final class GoogleFirebaseAppcheckV1MintAppCheckTokenRequest extends com.google.api.client.json.GenericJson {

/**
* Optional. If specified, the returned App Check token will be a limited-use token minted
* according to the specified configuration options.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private GoogleFirebaseAppcheckV1LimitedUseConfig limitedUseConfig;

/**
* Optional. If specified, the returned App Check token will be a session token, valid for the
* specified duration. Must be between 30 minutes and 7 days, inclusive.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private String tokenTtl;

/**
* Optional. If specified, the returned App Check token will be a limited-use token minted
* according to the specified configuration options.
* @return value or {@code null} for none
*/
public GoogleFirebaseAppcheckV1LimitedUseConfig getLimitedUseConfig() {
return limitedUseConfig;
}

/**
* Optional. If specified, the returned App Check token will be a limited-use token minted
* according to the specified configuration options.
* @param limitedUseConfig limitedUseConfig or {@code null} for none
*/
public GoogleFirebaseAppcheckV1MintAppCheckTokenRequest setLimitedUseConfig(GoogleFirebaseAppcheckV1LimitedUseConfig limitedUseConfig) {
this.limitedUseConfig = limitedUseConfig;
return this;
}

/**
* Optional. If specified, the returned App Check token will be a session token, valid for the
* specified duration. Must be between 30 minutes and 7 days, inclusive.
* @return value or {@code null} for none
*/
public String getTokenTtl() {
return tokenTtl;
}

/**
* Optional. If specified, the returned App Check token will be a session token, valid for the
* specified duration. Must be between 30 minutes and 7 days, inclusive.
* @param tokenTtl tokenTtl or {@code null} for none
*/
public GoogleFirebaseAppcheckV1MintAppCheckTokenRequest setTokenTtl(String tokenTtl) {
this.tokenTtl = tokenTtl;
return this;
}

@Override
public GoogleFirebaseAppcheckV1MintAppCheckTokenRequest set(String fieldName, Object value) {
return (GoogleFirebaseAppcheckV1MintAppCheckTokenRequest) super.set(fieldName, value);
}

@Override
public GoogleFirebaseAppcheckV1MintAppCheckTokenRequest clone() {
return (GoogleFirebaseAppcheckV1MintAppCheckTokenRequest) super.clone();
}

}
Loading
Loading