codekingpro/portable-devtools
114k
1# Copyright 2025 Google LLC2#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 at6#7# http://www.apache.org/licenses/LICENSE-2.08#9# Unless required by applicable law or agreed to in writing, software10# 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 and13# limitations under the License.14 15from typing import ClassVar as _ClassVar16from typing import Iterable as _Iterable17from typing import Mapping as _Mapping18from typing import Optional as _Optional19from typing import Union as _Union20 21from google.protobuf import descriptor as _descriptor22from google.protobuf import message as _message23from google.protobuf.internal import containers as _containers24 25DESCRIPTOR: _descriptor.FileDescriptor26 27class Authentication(_message.Message):28 __slots__ = ("rules", "providers")29 RULES_FIELD_NUMBER: _ClassVar[int]30 PROVIDERS_FIELD_NUMBER: _ClassVar[int]31 rules: _containers.RepeatedCompositeFieldContainer[AuthenticationRule]32 providers: _containers.RepeatedCompositeFieldContainer[AuthProvider]33 def __init__(34 self,35 rules: _Optional[_Iterable[_Union[AuthenticationRule, _Mapping]]] = ...,36 providers: _Optional[_Iterable[_Union[AuthProvider, _Mapping]]] = ...,37 ) -> None: ...38 39class AuthenticationRule(_message.Message):40 __slots__ = ("selector", "oauth", "allow_without_credential", "requirements")41 SELECTOR_FIELD_NUMBER: _ClassVar[int]42 OAUTH_FIELD_NUMBER: _ClassVar[int]43 ALLOW_WITHOUT_CREDENTIAL_FIELD_NUMBER: _ClassVar[int]44 REQUIREMENTS_FIELD_NUMBER: _ClassVar[int]45 selector: str46 oauth: OAuthRequirements47 allow_without_credential: bool48 requirements: _containers.RepeatedCompositeFieldContainer[AuthRequirement]49 def __init__(50 self,51 selector: _Optional[str] = ...,52 oauth: _Optional[_Union[OAuthRequirements, _Mapping]] = ...,53 allow_without_credential: bool = ...,54 requirements: _Optional[_Iterable[_Union[AuthRequirement, _Mapping]]] = ...,55 ) -> None: ...56 57class JwtLocation(_message.Message):58 __slots__ = ("header", "query", "cookie", "value_prefix")59 HEADER_FIELD_NUMBER: _ClassVar[int]60 QUERY_FIELD_NUMBER: _ClassVar[int]61 COOKIE_FIELD_NUMBER: _ClassVar[int]62 VALUE_PREFIX_FIELD_NUMBER: _ClassVar[int]63 header: str64 query: str65 cookie: str66 value_prefix: str67 def __init__(68 self,69 header: _Optional[str] = ...,70 query: _Optional[str] = ...,71 cookie: _Optional[str] = ...,72 value_prefix: _Optional[str] = ...,73 ) -> None: ...74 75class AuthProvider(_message.Message):76 __slots__ = (77 "id",78 "issuer",79 "jwks_uri",80 "audiences",81 "authorization_url",82 "jwt_locations",83 )84 ID_FIELD_NUMBER: _ClassVar[int]85 ISSUER_FIELD_NUMBER: _ClassVar[int]86 JWKS_URI_FIELD_NUMBER: _ClassVar[int]87 AUDIENCES_FIELD_NUMBER: _ClassVar[int]88 AUTHORIZATION_URL_FIELD_NUMBER: _ClassVar[int]89 JWT_LOCATIONS_FIELD_NUMBER: _ClassVar[int]90 id: str91 issuer: str92 jwks_uri: str93 audiences: str94 authorization_url: str95 jwt_locations: _containers.RepeatedCompositeFieldContainer[JwtLocation]96 def __init__(97 self,98 id: _Optional[str] = ...,99 issuer: _Optional[str] = ...,100 jwks_uri: _Optional[str] = ...,101 audiences: _Optional[str] = ...,102 authorization_url: _Optional[str] = ...,103 jwt_locations: _Optional[_Iterable[_Union[JwtLocation, _Mapping]]] = ...,104 ) -> None: ...105 106class OAuthRequirements(_message.Message):107 __slots__ = ("canonical_scopes",)108 CANONICAL_SCOPES_FIELD_NUMBER: _ClassVar[int]109 canonical_scopes: str110 def __init__(self, canonical_scopes: _Optional[str] = ...) -> None: ...111 112class AuthRequirement(_message.Message):113 __slots__ = ("provider_id", "audiences")114 PROVIDER_ID_FIELD_NUMBER: _ClassVar[int]115 AUDIENCES_FIELD_NUMBER: _ClassVar[int]116 provider_id: str117 audiences: str118 def __init__(119 self, provider_id: _Optional[str] = ..., audiences: _Optional[str] = ...120 ) -> None: ...121 