| 1 |
<?php |
| 2 |
|
| 3 |
# Generated by the protocol buffer compiler. DO NOT EDIT! |
| 4 |
# source: google/api/auth.proto |
| 5 |
namespace Dudlewebs\WPMCS\Google\Api; |
| 6 |
|
| 7 |
use Dudlewebs\WPMCS\Google\Protobuf\Internal\GPBType; |
| 8 |
use Dudlewebs\WPMCS\Google\Protobuf\Internal\RepeatedField; |
| 9 |
use Dudlewebs\WPMCS\Google\Protobuf\Internal\GPBUtil; |
| 10 |
/** |
| 11 |
* Configuration for an authentication provider, including support for |
| 12 |
* [JSON Web Token |
| 13 |
* (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32). |
| 14 |
* |
| 15 |
* Generated from protobuf message <code>google.api.AuthProvider</code> |
| 16 |
*/ |
| 17 |
class AuthProvider extends \Dudlewebs\WPMCS\Google\Protobuf\Internal\Message |
| 18 |
{ |
| 19 |
/** |
| 20 |
* The unique identifier of the auth provider. It will be referred to by |
| 21 |
* `AuthRequirement.provider_id`. |
| 22 |
* Example: "bookstore_auth". |
| 23 |
* |
| 24 |
* Generated from protobuf field <code>string id = 1;</code> |
| 25 |
*/ |
| 26 |
protected $id = ''; |
| 27 |
/** |
| 28 |
* Identifies the principal that issued the JWT. See |
| 29 |
* https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1 |
| 30 |
* Usually a URL or an email address. |
| 31 |
* Example: https://securetoken.google.com |
| 32 |
* Example: 1234567-compute@developer.gserviceaccount.com |
| 33 |
* |
| 34 |
* Generated from protobuf field <code>string issuer = 2;</code> |
| 35 |
*/ |
| 36 |
protected $issuer = ''; |
| 37 |
/** |
| 38 |
* URL of the provider's public key set to validate signature of the JWT. See |
| 39 |
* [OpenID |
| 40 |
* Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata). |
| 41 |
* Optional if the key set document: |
| 42 |
* - can be retrieved from |
| 43 |
* [OpenID |
| 44 |
* Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html) |
| 45 |
* of the issuer. |
| 46 |
* - can be inferred from the email domain of the issuer (e.g. a Google |
| 47 |
* service account). |
| 48 |
* Example: https://www.googleapis.com/oauth2/v1/certs |
| 49 |
* |
| 50 |
* Generated from protobuf field <code>string jwks_uri = 3;</code> |
| 51 |
*/ |
| 52 |
protected $jwks_uri = ''; |
| 53 |
/** |
| 54 |
* The list of JWT |
| 55 |
* [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). |
| 56 |
* that are allowed to access. A JWT containing any of these audiences will |
| 57 |
* be accepted. When this setting is absent, JWTs with audiences: |
| 58 |
* - "https://[service.name]/[google.protobuf.Api.name]" |
| 59 |
* - "https://[service.name]/" |
| 60 |
* will be accepted. |
| 61 |
* For example, if no audiences are in the setting, LibraryService API will |
| 62 |
* accept JWTs with the following audiences: |
| 63 |
* - |
| 64 |
* https://library-example.googleapis.com/google.example.library.v1.LibraryService |
| 65 |
* - https://library-example.googleapis.com/ |
| 66 |
* Example: |
| 67 |
* audiences: bookstore_android.apps.googleusercontent.com, |
| 68 |
* bookstore_web.apps.googleusercontent.com |
| 69 |
* |
| 70 |
* Generated from protobuf field <code>string audiences = 4;</code> |
| 71 |
*/ |
| 72 |
protected $audiences = ''; |
| 73 |
/** |
| 74 |
* Redirect URL if JWT token is required but not present or is expired. |
| 75 |
* Implement authorizationUrl of securityDefinitions in OpenAPI spec. |
| 76 |
* |
| 77 |
* Generated from protobuf field <code>string authorization_url = 5;</code> |
| 78 |
*/ |
| 79 |
protected $authorization_url = ''; |
| 80 |
/** |
| 81 |
* Defines the locations to extract the JWT. For now it is only used by the |
| 82 |
* Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations] |
| 83 |
* (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations) |
| 84 |
* JWT locations can be one of HTTP headers, URL query parameters or |
| 85 |
* cookies. The rule is that the first match wins. |
| 86 |
* If not specified, default to use following 3 locations: |
| 87 |
* 1) Authorization: Bearer |
| 88 |
* 2) x-goog-iap-jwt-assertion |
| 89 |
* 3) access_token query parameter |
| 90 |
* Default locations can be specified as followings: |
| 91 |
* jwt_locations: |
| 92 |
* - header: Authorization |
| 93 |
* value_prefix: "Bearer " |
| 94 |
* - header: x-goog-iap-jwt-assertion |
| 95 |
* - query: access_token |
| 96 |
* |
| 97 |
* Generated from protobuf field <code>repeated .google.api.JwtLocation jwt_locations = 6;</code> |
| 98 |
*/ |
| 99 |
private $jwt_locations; |
| 100 |
/** |
| 101 |
* Constructor. |
| 102 |
* |
| 103 |
* @param array $data { |
| 104 |
* Optional. Data for populating the Message object. |
| 105 |
* |
| 106 |
* @type string $id |
| 107 |
* The unique identifier of the auth provider. It will be referred to by |
| 108 |
* `AuthRequirement.provider_id`. |
| 109 |
* Example: "bookstore_auth". |
| 110 |
* @type string $issuer |
| 111 |
* Identifies the principal that issued the JWT. See |
| 112 |
* https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1 |
| 113 |
* Usually a URL or an email address. |
| 114 |
* Example: https://securetoken.google.com |
| 115 |
* Example: 1234567-compute@developer.gserviceaccount.com |
| 116 |
* @type string $jwks_uri |
| 117 |
* URL of the provider's public key set to validate signature of the JWT. See |
| 118 |
* [OpenID |
| 119 |
* Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata). |
| 120 |
* Optional if the key set document: |
| 121 |
* - can be retrieved from |
| 122 |
* [OpenID |
| 123 |
* Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html) |
| 124 |
* of the issuer. |
| 125 |
* - can be inferred from the email domain of the issuer (e.g. a Google |
| 126 |
* service account). |
| 127 |
* Example: https://www.googleapis.com/oauth2/v1/certs |
| 128 |
* @type string $audiences |
| 129 |
* The list of JWT |
| 130 |
* [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). |
| 131 |
* that are allowed to access. A JWT containing any of these audiences will |
| 132 |
* be accepted. When this setting is absent, JWTs with audiences: |
| 133 |
* - "https://[service.name]/[google.protobuf.Api.name]" |
| 134 |
* - "https://[service.name]/" |
| 135 |
* will be accepted. |
| 136 |
* For example, if no audiences are in the setting, LibraryService API will |
| 137 |
* accept JWTs with the following audiences: |
| 138 |
* - |
| 139 |
* https://library-example.googleapis.com/google.example.library.v1.LibraryService |
| 140 |
* - https://library-example.googleapis.com/ |
| 141 |
* Example: |
| 142 |
* audiences: bookstore_android.apps.googleusercontent.com, |
| 143 |
* bookstore_web.apps.googleusercontent.com |
| 144 |
* @type string $authorization_url |
| 145 |
* Redirect URL if JWT token is required but not present or is expired. |
| 146 |
* Implement authorizationUrl of securityDefinitions in OpenAPI spec. |
| 147 |
* @type array<\Google\Api\JwtLocation>|\Google\Protobuf\Internal\RepeatedField $jwt_locations |
| 148 |
* Defines the locations to extract the JWT. For now it is only used by the |
| 149 |
* Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations] |
| 150 |
* (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations) |
| 151 |
* JWT locations can be one of HTTP headers, URL query parameters or |
| 152 |
* cookies. The rule is that the first match wins. |
| 153 |
* If not specified, default to use following 3 locations: |
| 154 |
* 1) Authorization: Bearer |
| 155 |
* 2) x-goog-iap-jwt-assertion |
| 156 |
* 3) access_token query parameter |
| 157 |
* Default locations can be specified as followings: |
| 158 |
* jwt_locations: |
| 159 |
* - header: Authorization |
| 160 |
* value_prefix: "Bearer " |
| 161 |
* - header: x-goog-iap-jwt-assertion |
| 162 |
* - query: access_token |
| 163 |
* } |
| 164 |
*/ |
| 165 |
public function __construct($data = NULL) |
| 166 |
{ |
| 167 |
\Dudlewebs\WPMCS\GPBMetadata\Google\Api\Auth::initOnce(); |
| 168 |
parent::__construct($data); |
| 169 |
} |
| 170 |
/** |
| 171 |
* The unique identifier of the auth provider. It will be referred to by |
| 172 |
* `AuthRequirement.provider_id`. |
| 173 |
* Example: "bookstore_auth". |
| 174 |
* |
| 175 |
* Generated from protobuf field <code>string id = 1;</code> |
| 176 |
* @return string |
| 177 |
*/ |
| 178 |
public function getId() |
| 179 |
{ |
| 180 |
return $this->id; |
| 181 |
} |
| 182 |
/** |
| 183 |
* The unique identifier of the auth provider. It will be referred to by |
| 184 |
* `AuthRequirement.provider_id`. |
| 185 |
* Example: "bookstore_auth". |
| 186 |
* |
| 187 |
* Generated from protobuf field <code>string id = 1;</code> |
| 188 |
* @param string $var |
| 189 |
* @return $this |
| 190 |
*/ |
| 191 |
public function setId($var) |
| 192 |
{ |
| 193 |
GPBUtil::checkString($var, True); |
| 194 |
$this->id = $var; |
| 195 |
return $this; |
| 196 |
} |
| 197 |
/** |
| 198 |
* Identifies the principal that issued the JWT. See |
| 199 |
* https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1 |
| 200 |
* Usually a URL or an email address. |
| 201 |
* Example: https://securetoken.google.com |
| 202 |
* Example: 1234567-compute@developer.gserviceaccount.com |
| 203 |
* |
| 204 |
* Generated from protobuf field <code>string issuer = 2;</code> |
| 205 |
* @return string |
| 206 |
*/ |
| 207 |
public function getIssuer() |
| 208 |
{ |
| 209 |
return $this->issuer; |
| 210 |
} |
| 211 |
/** |
| 212 |
* Identifies the principal that issued the JWT. See |
| 213 |
* https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1 |
| 214 |
* Usually a URL or an email address. |
| 215 |
* Example: https://securetoken.google.com |
| 216 |
* Example: 1234567-compute@developer.gserviceaccount.com |
| 217 |
* |
| 218 |
* Generated from protobuf field <code>string issuer = 2;</code> |
| 219 |
* @param string $var |
| 220 |
* @return $this |
| 221 |
*/ |
| 222 |
public function setIssuer($var) |
| 223 |
{ |
| 224 |
GPBUtil::checkString($var, True); |
| 225 |
$this->issuer = $var; |
| 226 |
return $this; |
| 227 |
} |
| 228 |
/** |
| 229 |
* URL of the provider's public key set to validate signature of the JWT. See |
| 230 |
* [OpenID |
| 231 |
* Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata). |
| 232 |
* Optional if the key set document: |
| 233 |
* - can be retrieved from |
| 234 |
* [OpenID |
| 235 |
* Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html) |
| 236 |
* of the issuer. |
| 237 |
* - can be inferred from the email domain of the issuer (e.g. a Google |
| 238 |
* service account). |
| 239 |
* Example: https://www.googleapis.com/oauth2/v1/certs |
| 240 |
* |
| 241 |
* Generated from protobuf field <code>string jwks_uri = 3;</code> |
| 242 |
* @return string |
| 243 |
*/ |
| 244 |
public function getJwksUri() |
| 245 |
{ |
| 246 |
return $this->jwks_uri; |
| 247 |
} |
| 248 |
/** |
| 249 |
* URL of the provider's public key set to validate signature of the JWT. See |
| 250 |
* [OpenID |
| 251 |
* Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata). |
| 252 |
* Optional if the key set document: |
| 253 |
* - can be retrieved from |
| 254 |
* [OpenID |
| 255 |
* Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html) |
| 256 |
* of the issuer. |
| 257 |
* - can be inferred from the email domain of the issuer (e.g. a Google |
| 258 |
* service account). |
| 259 |
* Example: https://www.googleapis.com/oauth2/v1/certs |
| 260 |
* |
| 261 |
* Generated from protobuf field <code>string jwks_uri = 3;</code> |
| 262 |
* @param string $var |
| 263 |
* @return $this |
| 264 |
*/ |
| 265 |
public function setJwksUri($var) |
| 266 |
{ |
| 267 |
GPBUtil::checkString($var, True); |
| 268 |
$this->jwks_uri = $var; |
| 269 |
return $this; |
| 270 |
} |
| 271 |
/** |
| 272 |
* The list of JWT |
| 273 |
* [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). |
| 274 |
* that are allowed to access. A JWT containing any of these audiences will |
| 275 |
* be accepted. When this setting is absent, JWTs with audiences: |
| 276 |
* - "https://[service.name]/[google.protobuf.Api.name]" |
| 277 |
* - "https://[service.name]/" |
| 278 |
* will be accepted. |
| 279 |
* For example, if no audiences are in the setting, LibraryService API will |
| 280 |
* accept JWTs with the following audiences: |
| 281 |
* - |
| 282 |
* https://library-example.googleapis.com/google.example.library.v1.LibraryService |
| 283 |
* - https://library-example.googleapis.com/ |
| 284 |
* Example: |
| 285 |
* audiences: bookstore_android.apps.googleusercontent.com, |
| 286 |
* bookstore_web.apps.googleusercontent.com |
| 287 |
* |
| 288 |
* Generated from protobuf field <code>string audiences = 4;</code> |
| 289 |
* @return string |
| 290 |
*/ |
| 291 |
public function getAudiences() |
| 292 |
{ |
| 293 |
return $this->audiences; |
| 294 |
} |
| 295 |
/** |
| 296 |
* The list of JWT |
| 297 |
* [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). |
| 298 |
* that are allowed to access. A JWT containing any of these audiences will |
| 299 |
* be accepted. When this setting is absent, JWTs with audiences: |
| 300 |
* - "https://[service.name]/[google.protobuf.Api.name]" |
| 301 |
* - "https://[service.name]/" |
| 302 |
* will be accepted. |
| 303 |
* For example, if no audiences are in the setting, LibraryService API will |
| 304 |
* accept JWTs with the following audiences: |
| 305 |
* - |
| 306 |
* https://library-example.googleapis.com/google.example.library.v1.LibraryService |
| 307 |
* - https://library-example.googleapis.com/ |
| 308 |
* Example: |
| 309 |
* audiences: bookstore_android.apps.googleusercontent.com, |
| 310 |
* bookstore_web.apps.googleusercontent.com |
| 311 |
* |
| 312 |
* Generated from protobuf field <code>string audiences = 4;</code> |
| 313 |
* @param string $var |
| 314 |
* @return $this |
| 315 |
*/ |
| 316 |
public function setAudiences($var) |
| 317 |
{ |
| 318 |
GPBUtil::checkString($var, True); |
| 319 |
$this->audiences = $var; |
| 320 |
return $this; |
| 321 |
} |
| 322 |
/** |
| 323 |
* Redirect URL if JWT token is required but not present or is expired. |
| 324 |
* Implement authorizationUrl of securityDefinitions in OpenAPI spec. |
| 325 |
* |
| 326 |
* Generated from protobuf field <code>string authorization_url = 5;</code> |
| 327 |
* @return string |
| 328 |
*/ |
| 329 |
public function getAuthorizationUrl() |
| 330 |
{ |
| 331 |
return $this->authorization_url; |
| 332 |
} |
| 333 |
/** |
| 334 |
* Redirect URL if JWT token is required but not present or is expired. |
| 335 |
* Implement authorizationUrl of securityDefinitions in OpenAPI spec. |
| 336 |
* |
| 337 |
* Generated from protobuf field <code>string authorization_url = 5;</code> |
| 338 |
* @param string $var |
| 339 |
* @return $this |
| 340 |
*/ |
| 341 |
public function setAuthorizationUrl($var) |
| 342 |
{ |
| 343 |
GPBUtil::checkString($var, True); |
| 344 |
$this->authorization_url = $var; |
| 345 |
return $this; |
| 346 |
} |
| 347 |
/** |
| 348 |
* Defines the locations to extract the JWT. For now it is only used by the |
| 349 |
* Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations] |
| 350 |
* (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations) |
| 351 |
* JWT locations can be one of HTTP headers, URL query parameters or |
| 352 |
* cookies. The rule is that the first match wins. |
| 353 |
* If not specified, default to use following 3 locations: |
| 354 |
* 1) Authorization: Bearer |
| 355 |
* 2) x-goog-iap-jwt-assertion |
| 356 |
* 3) access_token query parameter |
| 357 |
* Default locations can be specified as followings: |
| 358 |
* jwt_locations: |
| 359 |
* - header: Authorization |
| 360 |
* value_prefix: "Bearer " |
| 361 |
* - header: x-goog-iap-jwt-assertion |
| 362 |
* - query: access_token |
| 363 |
* |
| 364 |
* Generated from protobuf field <code>repeated .google.api.JwtLocation jwt_locations = 6;</code> |
| 365 |
* @return \Google\Protobuf\Internal\RepeatedField |
| 366 |
*/ |
| 367 |
public function getJwtLocations() |
| 368 |
{ |
| 369 |
return $this->jwt_locations; |
| 370 |
} |
| 371 |
/** |
| 372 |
* Defines the locations to extract the JWT. For now it is only used by the |
| 373 |
* Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations] |
| 374 |
* (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations) |
| 375 |
* JWT locations can be one of HTTP headers, URL query parameters or |
| 376 |
* cookies. The rule is that the first match wins. |
| 377 |
* If not specified, default to use following 3 locations: |
| 378 |
* 1) Authorization: Bearer |
| 379 |
* 2) x-goog-iap-jwt-assertion |
| 380 |
* 3) access_token query parameter |
| 381 |
* Default locations can be specified as followings: |
| 382 |
* jwt_locations: |
| 383 |
* - header: Authorization |
| 384 |
* value_prefix: "Bearer " |
| 385 |
* - header: x-goog-iap-jwt-assertion |
| 386 |
* - query: access_token |
| 387 |
* |
| 388 |
* Generated from protobuf field <code>repeated .google.api.JwtLocation jwt_locations = 6;</code> |
| 389 |
* @param array<\Google\Api\JwtLocation>|\Google\Protobuf\Internal\RepeatedField $var |
| 390 |
* @return $this |
| 391 |
*/ |
| 392 |
public function setJwtLocations($var) |
| 393 |
{ |
| 394 |
$arr = GPBUtil::checkRepeatedField($var, \Dudlewebs\WPMCS\Google\Protobuf\Internal\GPBType::MESSAGE, \Dudlewebs\WPMCS\Google\Api\JwtLocation::class); |
| 395 |
$this->jwt_locations = $arr; |
| 396 |
return $this; |
| 397 |
} |
| 398 |
} |
| 399 |
|