auth_pb2.pyi 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. # Copyright 2025 Google LLC
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. from typing import ClassVar as _ClassVar
  15. from typing import Iterable as _Iterable
  16. from typing import Mapping as _Mapping
  17. from typing import Optional as _Optional
  18. from typing import Union as _Union
  19. from google.protobuf import descriptor as _descriptor
  20. from google.protobuf import message as _message
  21. from google.protobuf.internal import containers as _containers
  22. DESCRIPTOR: _descriptor.FileDescriptor
  23. class Authentication(_message.Message):
  24. __slots__ = ("rules", "providers")
  25. RULES_FIELD_NUMBER: _ClassVar[int]
  26. PROVIDERS_FIELD_NUMBER: _ClassVar[int]
  27. rules: _containers.RepeatedCompositeFieldContainer[AuthenticationRule]
  28. providers: _containers.RepeatedCompositeFieldContainer[AuthProvider]
  29. def __init__(
  30. self,
  31. rules: _Optional[_Iterable[_Union[AuthenticationRule, _Mapping]]] = ...,
  32. providers: _Optional[_Iterable[_Union[AuthProvider, _Mapping]]] = ...,
  33. ) -> None: ...
  34. class AuthenticationRule(_message.Message):
  35. __slots__ = ("selector", "oauth", "allow_without_credential", "requirements")
  36. SELECTOR_FIELD_NUMBER: _ClassVar[int]
  37. OAUTH_FIELD_NUMBER: _ClassVar[int]
  38. ALLOW_WITHOUT_CREDENTIAL_FIELD_NUMBER: _ClassVar[int]
  39. REQUIREMENTS_FIELD_NUMBER: _ClassVar[int]
  40. selector: str
  41. oauth: OAuthRequirements
  42. allow_without_credential: bool
  43. requirements: _containers.RepeatedCompositeFieldContainer[AuthRequirement]
  44. def __init__(
  45. self,
  46. selector: _Optional[str] = ...,
  47. oauth: _Optional[_Union[OAuthRequirements, _Mapping]] = ...,
  48. allow_without_credential: bool = ...,
  49. requirements: _Optional[_Iterable[_Union[AuthRequirement, _Mapping]]] = ...,
  50. ) -> None: ...
  51. class JwtLocation(_message.Message):
  52. __slots__ = ("header", "query", "cookie", "value_prefix")
  53. HEADER_FIELD_NUMBER: _ClassVar[int]
  54. QUERY_FIELD_NUMBER: _ClassVar[int]
  55. COOKIE_FIELD_NUMBER: _ClassVar[int]
  56. VALUE_PREFIX_FIELD_NUMBER: _ClassVar[int]
  57. header: str
  58. query: str
  59. cookie: str
  60. value_prefix: str
  61. def __init__(
  62. self,
  63. header: _Optional[str] = ...,
  64. query: _Optional[str] = ...,
  65. cookie: _Optional[str] = ...,
  66. value_prefix: _Optional[str] = ...,
  67. ) -> None: ...
  68. class AuthProvider(_message.Message):
  69. __slots__ = (
  70. "id",
  71. "issuer",
  72. "jwks_uri",
  73. "audiences",
  74. "authorization_url",
  75. "jwt_locations",
  76. )
  77. ID_FIELD_NUMBER: _ClassVar[int]
  78. ISSUER_FIELD_NUMBER: _ClassVar[int]
  79. JWKS_URI_FIELD_NUMBER: _ClassVar[int]
  80. AUDIENCES_FIELD_NUMBER: _ClassVar[int]
  81. AUTHORIZATION_URL_FIELD_NUMBER: _ClassVar[int]
  82. JWT_LOCATIONS_FIELD_NUMBER: _ClassVar[int]
  83. id: str
  84. issuer: str
  85. jwks_uri: str
  86. audiences: str
  87. authorization_url: str
  88. jwt_locations: _containers.RepeatedCompositeFieldContainer[JwtLocation]
  89. def __init__(
  90. self,
  91. id: _Optional[str] = ...,
  92. issuer: _Optional[str] = ...,
  93. jwks_uri: _Optional[str] = ...,
  94. audiences: _Optional[str] = ...,
  95. authorization_url: _Optional[str] = ...,
  96. jwt_locations: _Optional[_Iterable[_Union[JwtLocation, _Mapping]]] = ...,
  97. ) -> None: ...
  98. class OAuthRequirements(_message.Message):
  99. __slots__ = ("canonical_scopes",)
  100. CANONICAL_SCOPES_FIELD_NUMBER: _ClassVar[int]
  101. canonical_scopes: str
  102. def __init__(self, canonical_scopes: _Optional[str] = ...) -> None: ...
  103. class AuthRequirement(_message.Message):
  104. __slots__ = ("provider_id", "audiences")
  105. PROVIDER_ID_FIELD_NUMBER: _ClassVar[int]
  106. AUDIENCES_FIELD_NUMBER: _ClassVar[int]
  107. provider_id: str
  108. audiences: str
  109. def __init__(
  110. self, provider_id: _Optional[str] = ..., audiences: _Optional[str] = ...
  111. ) -> None: ...