mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2025-10-28 12:45:47 +00:00
wip
This commit is contained in:
@@ -177,10 +177,10 @@ func (app *BootstrapApp) Setup() error {
|
||||
// Create controllers
|
||||
contextController := controller.NewContextController(controller.ContextControllerConfig{
|
||||
ConfiguredProviders: configuredProviders,
|
||||
DisableContinue: app.Config.DisableContinue,
|
||||
Title: app.Config.Title,
|
||||
GenericName: app.Config.GenericName,
|
||||
Domain: domain,
|
||||
AppURL: app.Config.AppURL,
|
||||
RootDomain: domain,
|
||||
ForgotPasswordMessage: app.Config.ForgotPasswordMessage,
|
||||
BackgroundImage: app.Config.BackgroundImage,
|
||||
OAuthAutoRedirect: app.Config.OAuthAutoRedirect,
|
||||
|
||||
@@ -36,7 +36,6 @@ type Config struct {
|
||||
GenericUserURL string `mapstructure:"generic-user-url"`
|
||||
GenericName string `mapstructure:"generic-name"`
|
||||
GenericSkipSSL bool `mapstructure:"generic-skip-ssl"`
|
||||
DisableContinue bool `mapstructure:"disable-continue"`
|
||||
OAuthWhitelist string `mapstructure:"oauth-whitelist"`
|
||||
OAuthAutoRedirect string `mapstructure:"oauth-auto-redirect" validate:"oneof=none github google generic"`
|
||||
SessionExpiry int `mapstructure:"session-expiry"`
|
||||
|
||||
@@ -15,7 +15,7 @@ type UserContextResponse struct {
|
||||
Name string `json:"name"`
|
||||
Email string `json:"email"`
|
||||
Provider string `json:"provider"`
|
||||
Oauth bool `json:"oauth"`
|
||||
OAuth bool `json:"oauth"`
|
||||
TotpPending bool `json:"totpPending"`
|
||||
}
|
||||
|
||||
@@ -23,10 +23,10 @@ type AppContextResponse struct {
|
||||
Status int `json:"status"`
|
||||
Message string `json:"message"`
|
||||
ConfiguredProviders []string `json:"configuredProviders"`
|
||||
DisableContinue bool `json:"disableContinue"`
|
||||
Title string `json:"title"`
|
||||
GenericName string `json:"genericName"`
|
||||
Domain string `json:"domain"`
|
||||
AppURL string `json:"appUrl"`
|
||||
RootDomain string `json:"rootDomain"`
|
||||
ForgotPasswordMessage string `json:"forgotPasswordMessage"`
|
||||
BackgroundImage string `json:"backgroundImage"`
|
||||
OAuthAutoRedirect string `json:"oauthAutoRedirect"`
|
||||
@@ -37,7 +37,8 @@ type ContextControllerConfig struct {
|
||||
DisableContinue bool
|
||||
Title string
|
||||
GenericName string
|
||||
Domain string
|
||||
AppURL string
|
||||
RootDomain string
|
||||
ForgotPasswordMessage string
|
||||
BackgroundImage string
|
||||
OAuthAutoRedirect string
|
||||
@@ -72,7 +73,7 @@ func (controller *ContextController) userContextHandler(c *gin.Context) {
|
||||
Name: context.Name,
|
||||
Email: context.Email,
|
||||
Provider: context.Provider,
|
||||
Oauth: context.OAuth,
|
||||
OAuth: context.OAuth,
|
||||
TotpPending: context.TotpPending,
|
||||
}
|
||||
|
||||
@@ -93,10 +94,10 @@ func (controller *ContextController) appContextHandler(c *gin.Context) {
|
||||
Status: 200,
|
||||
Message: "Success",
|
||||
ConfiguredProviders: controller.Config.ConfiguredProviders,
|
||||
DisableContinue: controller.Config.DisableContinue,
|
||||
Title: controller.Config.Title,
|
||||
GenericName: controller.Config.GenericName,
|
||||
Domain: controller.Config.Domain,
|
||||
AppURL: controller.Config.AppURL,
|
||||
RootDomain: controller.Config.RootDomain,
|
||||
ForgotPasswordMessage: controller.Config.ForgotPasswordMessage,
|
||||
BackgroundImage: controller.Config.BackgroundImage,
|
||||
OAuthAutoRedirect: controller.Config.OAuthAutoRedirect,
|
||||
|
||||
Reference in New Issue
Block a user