mirror of
https://github.com/openziti/zrok.git
synced 2025-02-16 18:20:51 +01:00
capitalization (#404)
This commit is contained in:
parent
ceee205239
commit
ed96a465a0
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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{
|
||||
|
@ -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"`
|
||||
|
Loading…
Reference in New Issue
Block a user