From 8225b1bb283b0cd5d7c3a9b66354726c0a87c0bf Mon Sep 17 00:00:00 2001 From: Cam Date: Thu, 15 Feb 2024 01:02:08 -0600 Subject: [PATCH] revert one name change --- controller/sharePrivate.go | 2 +- controller/sharePublic.go | 2 +- rest_model_zrok/share_request.go | 4 +-- rest_server_zrok/embedded_spec.go | 4 +-- sdk/golang/sdk/share.go | 2 +- .../sdk/zrok/zrok_api/models/share_request.py | 30 +++++++++---------- specs/zrok.yml | 2 +- ui/src/api/types.js | 2 +- 8 files changed, 24 insertions(+), 24 deletions(-) diff --git a/controller/sharePrivate.go b/controller/sharePrivate.go index 9f478b35..8e51cf58 100644 --- a/controller/sharePrivate.go +++ b/controller/sharePrivate.go @@ -27,7 +27,7 @@ func (a *privateResourceAllocator) allocate(envZId, shrToken string, params shar BasicAuthUsers: authUsers, Oauth: &sdk.OauthConfig{ Provider: params.Body.OauthProvider, - EmailDomains: params.Body.OauthEmailAddressPatterns, + EmailDomains: params.Body.OauthEmailDomains, AuthorizationCheckInterval: params.Body.OauthAuthorizationCheckInterval, }, } diff --git a/controller/sharePublic.go b/controller/sharePublic.go index 04d707c6..58539e8b 100644 --- a/controller/sharePublic.go +++ b/controller/sharePublic.go @@ -27,7 +27,7 @@ func (a *publicResourceAllocator) allocate(envZId, shrToken string, frontendZIds BasicAuthUsers: authUsers, Oauth: &sdk.OauthConfig{ Provider: params.Body.OauthProvider, - EmailDomains: params.Body.OauthEmailAddressPatterns, + EmailDomains: params.Body.OauthEmailDomains, AuthorizationCheckInterval: params.Body.OauthAuthorizationCheckInterval, }, } diff --git a/rest_model_zrok/share_request.go b/rest_model_zrok/share_request.go index c0ac2575..6125bd95 100644 --- a/rest_model_zrok/share_request.go +++ b/rest_model_zrok/share_request.go @@ -43,8 +43,8 @@ type ShareRequest struct { // oauth authorization check interval OauthAuthorizationCheckInterval string `json:"oauthAuthorizationCheckInterval,omitempty"` - // oauth email address patterns - OauthEmailAddressPatterns []string `json:"oauthEmailAddressPatterns"` + // oauth email domains + OauthEmailDomains []string `json:"oauthEmailDomains"` // oauth provider // Enum: [github google] diff --git a/rest_server_zrok/embedded_spec.go b/rest_server_zrok/embedded_spec.go index d03ef78a..fe803bd9 100644 --- a/rest_server_zrok/embedded_spec.go +++ b/rest_server_zrok/embedded_spec.go @@ -1495,7 +1495,7 @@ func init() { "oauthAuthorizationCheckInterval": { "type": "string" }, - "oauthEmailAddressPatterns": { + "oauthEmailDomains": { "type": "array", "items": { "type": "string" @@ -3119,7 +3119,7 @@ func init() { "oauthAuthorizationCheckInterval": { "type": "string" }, - "oauthEmailAddressPatterns": { + "oauthEmailDomains": { "type": "array", "items": { "type": "string" diff --git a/sdk/golang/sdk/share.go b/sdk/golang/sdk/share.go index 5b0b892c..04b25eed 100644 --- a/sdk/golang/sdk/share.go +++ b/sdk/golang/sdk/share.go @@ -84,7 +84,7 @@ func newPublicShare(root env_core.Root, request *ShareRequest) *share.ShareParam BackendMode: string(request.BackendMode), BackendProxyEndpoint: request.Target, AuthScheme: string(None), - OauthEmailAddressPatterns: request.OauthEmailAddressPatterns, + OauthEmailDomains: request.OauthEmailAddressPatterns, OauthProvider: request.OauthProvider, OauthAuthorizationCheckInterval: request.OauthAuthorizationCheckInterval.String(), } diff --git a/sdk/python/sdk/zrok/zrok_api/models/share_request.py b/sdk/python/sdk/zrok/zrok_api/models/share_request.py index 5368d4b0..331fa41a 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/share_request.py +++ b/sdk/python/sdk/zrok/zrok_api/models/share_request.py @@ -36,7 +36,7 @@ class ShareRequest(object): 'auth_scheme': 'str', 'auth_users': 'list[AuthUser]', 'oauth_provider': 'str', - 'oauth_email_address_patterns': 'list[str]', + 'oauth_email_domains': 'list[str]', 'oauth_authorization_check_interval': 'str', 'reserved': 'bool', 'unique_name': 'str' @@ -51,13 +51,13 @@ class ShareRequest(object): 'auth_scheme': 'authScheme', 'auth_users': 'authUsers', 'oauth_provider': 'oauthProvider', - 'oauth_email_address_patterns': 'oauthEmailAddressPatterns', + 'oauth_email_domains': 'oauthEmailDomains', 'oauth_authorization_check_interval': 'oauthAuthorizationCheckInterval', 'reserved': 'reserved', 'unique_name': 'uniqueName' } - def __init__(self, env_zid=None, share_mode=None, frontend_selection=None, backend_mode=None, backend_proxy_endpoint=None, auth_scheme=None, auth_users=None, oauth_provider=None, oauth_email_address_patterns=None, oauth_authorization_check_interval=None, reserved=None, unique_name=None): # noqa: E501 + def __init__(self, env_zid=None, share_mode=None, frontend_selection=None, backend_mode=None, backend_proxy_endpoint=None, auth_scheme=None, auth_users=None, oauth_provider=None, oauth_email_domains=None, oauth_authorization_check_interval=None, reserved=None, unique_name=None): # noqa: E501 """ShareRequest - a model defined in Swagger""" # noqa: E501 self._env_zid = None self._share_mode = None @@ -67,7 +67,7 @@ class ShareRequest(object): self._auth_scheme = None self._auth_users = None self._oauth_provider = None - self._oauth_email_address_patterns = None + self._oauth_email_domains = None self._oauth_authorization_check_interval = None self._reserved = None self._unique_name = None @@ -88,8 +88,8 @@ class ShareRequest(object): self.auth_users = auth_users if oauth_provider is not None: self.oauth_provider = oauth_provider - if oauth_email_address_patterns is not None: - self.oauth_email_address_patterns = oauth_email_address_patterns + if oauth_email_domains is not None: + self.oauth_email_domains = oauth_email_domains if oauth_authorization_check_interval is not None: self.oauth_authorization_check_interval = oauth_authorization_check_interval if reserved is not None: @@ -284,25 +284,25 @@ class ShareRequest(object): self._oauth_provider = oauth_provider @property - def oauth_email_address_patterns(self): - """Gets the oauth_email_address_patterns of this ShareRequest. # noqa: E501 + def oauth_email_domains(self): + """Gets the oauth_email_domains of this ShareRequest. # noqa: E501 - :return: The oauth_email_address_patterns of this ShareRequest. # noqa: E501 + :return: The oauth_email_domains of this ShareRequest. # noqa: E501 :rtype: list[str] """ - return self._oauth_email_address_patterns + return self._oauth_email_domains - @oauth_email_address_patterns.setter - def oauth_email_address_patterns(self, oauth_email_address_patterns): - """Sets the oauth_email_address_patterns of this ShareRequest. + @oauth_email_domains.setter + def oauth_email_domains(self, oauth_email_domains): + """Sets the oauth_email_domains of this ShareRequest. - :param oauth_email_address_patterns: The oauth_email_address_patterns of this ShareRequest. # noqa: E501 + :param oauth_email_domains: The oauth_email_domains of this ShareRequest. # noqa: E501 :type: list[str] """ - self._oauth_email_address_patterns = oauth_email_address_patterns + self._oauth_email_domains = oauth_email_domains @property def oauth_authorization_check_interval(self): diff --git a/specs/zrok.yml b/specs/zrok.yml index 7052f328..5986c003 100644 --- a/specs/zrok.yml +++ b/specs/zrok.yml @@ -985,7 +985,7 @@ definitions: oauthProvider: type: string enum: ["github", "google"] - oauthEmailAddressPatterns: + oauthEmailDomains: type: array items: type: string diff --git a/ui/src/api/types.js b/ui/src/api/types.js index 19727378..94654926 100644 --- a/ui/src/api/types.js +++ b/ui/src/api/types.js @@ -255,7 +255,7 @@ * @property {string} authScheme * @property {module:types.authUser[]} authUsers * @property {string} oauthProvider - * @property {string[]} oauthEmailAddressPatterns + * @property {string[]} oauthEmailDomains * @property {string} oauthAuthorizationCheckInterval * @property {boolean} reserved * @property {string} uniqueName