focalboard/server/einterfaces/einterfaces.go
2021-03-29 20:10:12 +02:00

25 lines
579 B
Go

package einterfaces
import (
"github.com/gorilla/mux"
"github.com/mattermost/focalboard/server/model"
)
type MattermostAuth interface {
RegisterRoutes(*mux.Router)
DoesUserHaveWorkspaceAccess(session *model.Session, workspaceID string) bool
}
type MattermostAuthParameters struct {
ServerRoot string
MattermostURL string
ClientID string
ClientSecret string
UseSecureCookie bool
}
type MattermostAuthStore interface {
GetUserById(userID string) (*model.User, error)
CreateUser(user *model.User) error
CreateSession(session *model.Session) error
}