mattermost/server/einterfaces/push_proxy.go
Eva Sarafianou 0d181ca215
Push Proxy Authentication (#34211)
* Initial Implementation of Push Proxy Authentication

* Include Config Listener for Leader plus delete startup function as job scheduler runs on initialization

* Remove push proxy auth from local imports

* Add push proxy auth to external imports

* Add push proxy auth error messages

* Update error codes

* Fix enterprise dep definition

* make i18n-extract

* Mock System store Get

* m

* m

* m

* m

* Update serverID header

* Add install type env var to docker

* Update Push Proxy config with new options

Global, US, Germany and Japan. Previous configurations will keep working

* use model.SafeDereference

* Delete token when new push proxy URL is empty

* ServerID header only if auth token is available

---------

Co-authored-by: Daniel Schalla <daniel@mattermost.com>
Co-authored-by: Nick Misasi <nick.misasi@mattermost.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2025-11-12 20:16:44 +02:00

27 lines
852 B
Go

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
package einterfaces
import (
"github.com/mattermost/mattermost/server/public/model"
ejobs "github.com/mattermost/mattermost/server/v8/einterfaces/jobs"
)
type PushProxyInterface interface {
// GetAuthToken returns the current auth token
// Returns empty string if not available or enterprise is not enabled
GetAuthToken() string
// GenerateAuthToken generates and stores an authentication token
GenerateAuthToken() *model.AppError
// DeleteAuthToken deletes the stored authentication token
DeleteAuthToken() *model.AppError
// MakeWorker creates a worker for the auth token generation job
MakeWorker() model.Worker
// MakeScheduler creates a scheduler for the auth token generation job
MakeScheduler() ejobs.Scheduler
}