source: vendor/google/apiclient-services/src/Firebaseappcheck/Resource/OauthClients.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 9 days ago

Upload project files

  • Property mode set to 100644
File size: 6.8 KB
Line 
1<?php
2/*
3 * Copyright 2014 Google Inc.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6 * use this file except in compliance with the License. You may obtain a copy of
7 * the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 * License for the specific language governing permissions and limitations under
15 * the License.
16 */
17
18namespace Google\Service\Firebaseappcheck\Resource;
19
20use Google\Service\Firebaseappcheck\GoogleFirebaseAppcheckV1AppCheckToken;
21use Google\Service\Firebaseappcheck\GoogleFirebaseAppcheckV1ExchangeAppAttestAssertionRequest;
22use Google\Service\Firebaseappcheck\GoogleFirebaseAppcheckV1ExchangeAppAttestAttestationRequest;
23use Google\Service\Firebaseappcheck\GoogleFirebaseAppcheckV1ExchangeAppAttestAttestationResponse;
24use Google\Service\Firebaseappcheck\GoogleFirebaseAppcheckV1ExchangeDebugTokenRequest;
25use Google\Service\Firebaseappcheck\GoogleFirebaseAppcheckV1GenerateAppAttestChallengeRequest;
26use Google\Service\Firebaseappcheck\GoogleFirebaseAppcheckV1GenerateAppAttestChallengeResponse;
27
28/**
29 * The "oauthClients" collection of methods.
30 * Typical usage is:
31 * <code>
32 * $firebaseappcheckService = new Google\Service\Firebaseappcheck(...);
33 * $oauthClients = $firebaseappcheckService->oauthClients;
34 * </code>
35 */
36class OauthClients extends \Google\Service\Resource
37{
38 /**
39 * Accepts an App Attest assertion and an artifact previously obtained from
40 * ExchangeAppAttestAttestation and verifies those with Apple. If valid, returns
41 * an AppCheckToken. (oauthClients.exchangeAppAttestAssertion)
42 *
43 * @param string $app Required. The relative resource name of the iOS app, in
44 * the format: ``` projects/{project_number}/apps/{app_id} ``` If necessary, the
45 * `project_number` element can be replaced with the project ID of the Firebase
46 * project. Learn more about using project identifiers in Google's [AIP
47 * 2510](https://google.aip.dev/cloud/2510) standard.
48 * @param GoogleFirebaseAppcheckV1ExchangeAppAttestAssertionRequest $postBody
49 * @param array $optParams Optional parameters.
50 * @return GoogleFirebaseAppcheckV1AppCheckToken
51 * @throws \Google\Service\Exception
52 */
53 public function exchangeAppAttestAssertion($app, GoogleFirebaseAppcheckV1ExchangeAppAttestAssertionRequest $postBody, $optParams = [])
54 {
55 $params = ['app' => $app, 'postBody' => $postBody];
56 $params = array_merge($params, $optParams);
57 return $this->call('exchangeAppAttestAssertion', [$params], GoogleFirebaseAppcheckV1AppCheckToken::class);
58 }
59 /**
60 * Accepts an App Attest CBOR attestation and verifies it with Apple using your
61 * preconfigured team and bundle IDs. If valid, returns an attestation artifact
62 * that can later be exchanged for an AppCheckToken using
63 * ExchangeAppAttestAssertion. For convenience and performance, this method's
64 * response object will also contain an AppCheckToken (if the verification is
65 * successful). (oauthClients.exchangeAppAttestAttestation)
66 *
67 * @param string $app Required. The relative resource name of the iOS app, in
68 * the format: ``` projects/{project_number}/apps/{app_id} ``` If necessary, the
69 * `project_number` element can be replaced with the project ID of the Firebase
70 * project. Learn more about using project identifiers in Google's [AIP
71 * 2510](https://google.aip.dev/cloud/2510) standard.
72 * @param GoogleFirebaseAppcheckV1ExchangeAppAttestAttestationRequest $postBody
73 * @param array $optParams Optional parameters.
74 * @return GoogleFirebaseAppcheckV1ExchangeAppAttestAttestationResponse
75 * @throws \Google\Service\Exception
76 */
77 public function exchangeAppAttestAttestation($app, GoogleFirebaseAppcheckV1ExchangeAppAttestAttestationRequest $postBody, $optParams = [])
78 {
79 $params = ['app' => $app, 'postBody' => $postBody];
80 $params = array_merge($params, $optParams);
81 return $this->call('exchangeAppAttestAttestation', [$params], GoogleFirebaseAppcheckV1ExchangeAppAttestAttestationResponse::class);
82 }
83 /**
84 * Validates a debug token secret that you have previously created using
85 * CreateDebugToken. If valid, returns an AppCheckToken. Note that a restrictive
86 * quota is enforced on this method to prevent accidental exposure of the app to
87 * abuse. (oauthClients.exchangeDebugToken)
88 *
89 * @param string $app Required. The relative resource name of the app, in the
90 * format: ``` projects/{project_number}/apps/{app_id} ``` If necessary, the
91 * `project_number` element can be replaced with the project ID of the Firebase
92 * project. Learn more about using project identifiers in Google's [AIP
93 * 2510](https://google.aip.dev/cloud/2510) standard.
94 * @param GoogleFirebaseAppcheckV1ExchangeDebugTokenRequest $postBody
95 * @param array $optParams Optional parameters.
96 * @return GoogleFirebaseAppcheckV1AppCheckToken
97 * @throws \Google\Service\Exception
98 */
99 public function exchangeDebugToken($app, GoogleFirebaseAppcheckV1ExchangeDebugTokenRequest $postBody, $optParams = [])
100 {
101 $params = ['app' => $app, 'postBody' => $postBody];
102 $params = array_merge($params, $optParams);
103 return $this->call('exchangeDebugToken', [$params], GoogleFirebaseAppcheckV1AppCheckToken::class);
104 }
105 /**
106 * Generates a challenge that protects the integrity of an immediately following
107 * call to ExchangeAppAttestAttestation or ExchangeAppAttestAssertion. A
108 * challenge should not be reused for multiple calls.
109 * (oauthClients.generateAppAttestChallenge)
110 *
111 * @param string $app Required. The relative resource name of the iOS app, in
112 * the format: ``` projects/{project_number}/apps/{app_id} ``` If necessary, the
113 * `project_number` element can be replaced with the project ID of the Firebase
114 * project. Learn more about using project identifiers in Google's [AIP
115 * 2510](https://google.aip.dev/cloud/2510) standard.
116 * @param GoogleFirebaseAppcheckV1GenerateAppAttestChallengeRequest $postBody
117 * @param array $optParams Optional parameters.
118 * @return GoogleFirebaseAppcheckV1GenerateAppAttestChallengeResponse
119 * @throws \Google\Service\Exception
120 */
121 public function generateAppAttestChallenge($app, GoogleFirebaseAppcheckV1GenerateAppAttestChallengeRequest $postBody, $optParams = [])
122 {
123 $params = ['app' => $app, 'postBody' => $postBody];
124 $params = array_merge($params, $optParams);
125 return $this->call('generateAppAttestChallenge', [$params], GoogleFirebaseAppcheckV1GenerateAppAttestChallengeResponse::class);
126 }
127}
128
129// Adding a class alias for backwards compatibility with the previous class name.
130class_alias(OauthClients::class, 'Google_Service_Firebaseappcheck_Resource_OauthClients');
Note: See TracBrowser for help on using the repository browser.