capitalization (#404)

This commit is contained in:
Michael Quigley 2023-09-25 14:06:14 -04:00
parent ceee205239
commit ed96a465a0
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62
4 changed files with 10 additions and 10 deletions

View File

@ -21,7 +21,7 @@ func (a *privateResourceAllocator) allocate(envZId, shrToken string, params shar
options := &zrokEdgeSdk.FrontendOptions{
AuthScheme: params.Body.AuthScheme,
AuthUsers: authUsers,
OAuth: &sdk.OAuthConfig{
Oauth: &sdk.OauthConfig{
Provider: params.Body.OauthProvider,
EmailDomains: params.Body.OauthEmailDomains,
AuthorizationCheckInterval: params.Body.OauthAuthorizationCheckInterval,

View File

@ -21,7 +21,7 @@ func (a *publicResourceAllocator) allocate(envZId, shrToken string, frontendZIds
options := &zrokEdgeSdk.FrontendOptions{
AuthScheme: params.Body.AuthScheme,
AuthUsers: authUsers,
OAuth: &sdk.OAuthConfig{
Oauth: &sdk.OauthConfig{
Provider: params.Body.OauthProvider,
EmailDomains: params.Body.OauthEmailDomains,
AuthorizationCheckInterval: params.Body.OauthAuthorizationCheckInterval,

View File

@ -14,7 +14,7 @@ import (
type FrontendOptions struct {
AuthScheme string
AuthUsers []*sdk.AuthUserConfig
OAuth *sdk.OAuthConfig
Oauth *sdk.OauthConfig
}
func CreateConfig(cfgTypeZId, envZId, shrToken string, options *FrontendOptions, edge *rest_management_api_client.ZitiEdgeManagement) (cfgZId string, err error) {
@ -31,11 +31,11 @@ func CreateConfig(cfgTypeZId, envZId, shrToken string, options *FrontendOptions,
cfg.BasicAuth.Users = append(cfg.BasicAuth.Users, &sdk.AuthUserConfig{Username: authUser.Username, Password: authUser.Password})
}
}
if cfg.AuthScheme == sdk.Oauth && options.OAuth != nil {
cfg.OAuthAuth = &sdk.OAuthConfig{
Provider: options.OAuth.Provider,
EmailDomains: options.OAuth.EmailDomains,
AuthorizationCheckInterval: options.OAuth.AuthorizationCheckInterval,
if cfg.AuthScheme == sdk.Oauth && options.Oauth != nil {
cfg.OauthAuth = &sdk.OauthConfig{
Provider: options.Oauth.Provider,
EmailDomains: options.Oauth.EmailDomains,
AuthorizationCheckInterval: options.Oauth.AuthorizationCheckInterval,
}
}
cfgCrt := &rest_model.ConfigCreate{

View File

@ -7,7 +7,7 @@ const ZrokProxyConfig = "zrok.proxy.v1"
type FrontendConfig struct {
AuthScheme AuthScheme `json:"auth_scheme"`
BasicAuth *BasicAuthConfig `json:"basic_auth"`
OAuthAuth *OAuthConfig `json:"oauth"`
OauthAuth *OauthConfig `json:"oauth"`
}
type BasicAuthConfig struct {
@ -19,7 +19,7 @@ type AuthUserConfig struct {
Password string `json:"password"`
}
type OAuthConfig struct {
type OauthConfig struct {
Provider string `json:"provider"`
EmailDomains []string `json:"email_domains"`
AuthorizationCheckInterval string `json:"authorization_check_interval"`